diff --git a/java-tasks/README.md b/java-tasks/README.md index faf3acde05d5..f0e2968ded6f 100644 --- a/java-tasks/README.md +++ b/java-tasks/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.16.0 + 26.18.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-tasks.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.19.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.21.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-tasks/google-cloud-tasks/pom.xml b/java-tasks/google-cloud-tasks/pom.xml index c83af75b6d3d..fd0763138e4a 100644 --- a/java-tasks/google-cloud-tasks/pom.xml +++ b/java-tasks/google-cloud-tasks/pom.xml @@ -123,5 +123,10 @@ testlib test + + com.google.api.grpc + grpc-google-common-protos + test + diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java index dcc794dae4a9..869a77e58c28 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java @@ -25,6 +25,10 @@ import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.resourcenames.ResourceName; +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.tasks.v2.stub.CloudTasksStub; import com.google.cloud.tasks.v2.stub.CloudTasksStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -2583,6 +2587,161 @@ public final UnaryCallable runTaskCallable() { return stub.runTaskCallable(); } + // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -2750,4 +2909,80 @@ protected ListTasksFixedSizeCollection createCollection( return new ListTasksFixedSizeCollection(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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksSettings.java index 47cc4c4eeb9e..d7b1cd95e781 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -31,6 +32,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.tasks.v2.stub.CloudTasksStubSettings; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -164,6 +169,17 @@ public UnaryCallSettings runTaskSettings() { return ((CloudTasksStubSettings) getStubSettings()).runTaskSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudTasksStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudTasksStubSettings) getStubSettings()).getLocationSettings(); + } + public static final CloudTasksSettings create(CloudTasksStubSettings stub) throws IOException { return new CloudTasksSettings.Builder(stub.toBuilder()).build(); } @@ -361,6 +377,18 @@ public UnaryCallSettings.Builder runTaskSettings() { return getStubSettingsBuilder().runTaskSettings(); } + /** 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 CloudTasksSettings build() throws IOException { return new CloudTasksSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/gapic_metadata.json b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/gapic_metadata.json index ed965741042d..8e63d149d604 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/gapic_metadata.json +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/gapic_metadata.json @@ -25,12 +25,18 @@ "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetQueue": { "methods": ["getQueue", "getQueue", "getQueue", "getQueueCallable"] }, "GetTask": { "methods": ["getTask", "getTask", "getTask", "getTaskCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListQueues": { "methods": ["listQueues", "listQueues", "listQueues", "listQueuesPagedCallable", "listQueuesCallable"] }, diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStub.java index 54e29d21def1..85e7989ae731 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStub.java @@ -16,11 +16,16 @@ package com.google.cloud.tasks.v2.stub; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; 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.tasks.v2.CreateQueueRequest; import com.google.cloud.tasks.v2.CreateTaskRequest; import com.google.cloud.tasks.v2.DeleteQueueRequest; @@ -128,6 +133,19 @@ public UnaryCallable runTaskCallable() { throw new UnsupportedOperationException("Not implemented: runTaskCallable()"); } + 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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java index 29f5841dce84..508b701926f1 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/CloudTasksStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2.stub; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -44,6 +45,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.tasks.v2.CreateQueueRequest; import com.google.cloud.tasks.v2.CreateTaskRequest; import com.google.cloud.tasks.v2.DeleteQueueRequest; @@ -137,6 +142,10 @@ public class CloudTasksStubSettings extends StubSettings private final UnaryCallSettings createTaskSettings; private final UnaryCallSettings deleteTaskSettings; private final UnaryCallSettings runTaskSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_QUEUES_PAGE_STR_DESC = @@ -210,6 +219,42 @@ public Iterable extractResources(ListTasksResponse 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< ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse> LIST_QUEUES_PAGE_STR_FACT = @@ -244,6 +289,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 listQueues. */ public PagedCallSettings listQueuesSettings() { @@ -327,6 +389,17 @@ public UnaryCallSettings runTaskSettings() { return runTaskSettings; } + /** 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 CloudTasksStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -449,6 +522,8 @@ protected CloudTasksStubSettings(Builder settingsBuilder) throws IOException { createTaskSettings = settingsBuilder.createTaskSettings().build(); deleteTaskSettings = settingsBuilder.deleteTaskSettings().build(); runTaskSettings = settingsBuilder.runTaskSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for CloudTasksStubSettings. */ @@ -475,6 +550,10 @@ public static class Builder extends StubSettings.Builder createTaskSettings; private final UnaryCallSettings.Builder deleteTaskSettings; private final UnaryCallSettings.Builder runTaskSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -488,6 +567,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -501,20 +581,22 @@ public static class Builder extends StubSettings.Builder>of( @@ -559,7 +643,9 @@ protected Builder(ClientContext clientContext) { getTaskSettings, createTaskSettings, deleteTaskSettings, - runTaskSettings); + runTaskSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -582,6 +668,8 @@ protected Builder(CloudTasksStubSettings settings) { createTaskSettings = settings.createTaskSettings.toBuilder(); deleteTaskSettings = settings.deleteTaskSettings.toBuilder(); runTaskSettings = settings.runTaskSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -600,7 +688,9 @@ protected Builder(CloudTasksStubSettings settings) { getTaskSettings, createTaskSettings, deleteTaskSettings, - runTaskSettings); + runTaskSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -710,6 +800,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; } @@ -811,6 +911,18 @@ public UnaryCallSettings.Builder runTaskSettings() { return runTaskSettings; } + /** 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 CloudTasksStubSettings build() throws IOException { return new CloudTasksStubSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/GrpcCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/GrpcCloudTasksStub.java index 8b358d3201a3..219d5853fdb8 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/GrpcCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/GrpcCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2.stub; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -26,6 +27,10 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2.CreateQueueRequest; import com.google.cloud.tasks.v2.CreateTaskRequest; import com.google.cloud.tasks.v2.DeleteQueueRequest; @@ -197,6 +202,25 @@ public class GrpcCloudTasksStub extends CloudTasksStub { .setResponseMarshaller(ProtoUtils.marshaller(Task.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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -216,6 +240,10 @@ public class GrpcCloudTasksStub extends CloudTasksStub { private final UnaryCallable createTaskCallable; private final UnaryCallable deleteTaskCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -420,6 +448,26 @@ protected GrpcCloudTasksStub( return builder.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -477,6 +525,15 @@ protected GrpcCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), 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()); @@ -577,6 +634,22 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/HttpJsonCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/HttpJsonCloudTasksStub.java index 2d62264f6bd4..966bbda9d27a 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/HttpJsonCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/stub/HttpJsonCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2.stub; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -32,6 +33,10 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2.CreateQueueRequest; import com.google.cloud.tasks.v2.CreateTaskRequest; import com.google.cloud.tasks.v2.DeleteQueueRequest; @@ -646,6 +651,74 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { .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( + "/v2/{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( + "/v2/{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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -665,6 +738,10 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { private final UnaryCallable createTaskCallable; private final UnaryCallable deleteTaskCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -885,6 +962,29 @@ protected HttpJsonCloudTasksStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -942,6 +1042,15 @@ protected HttpJsonCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), 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()); @@ -966,6 +1075,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(createTaskMethodDescriptor); methodDescriptors.add(deleteTaskMethodDescriptor); methodDescriptors.add(runTaskMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } @@ -1060,6 +1171,22 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java index a396e80a4330..b27669d0a56d 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta2; +import com.google.api.HttpBody; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -26,6 +27,10 @@ import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.resourcenames.ResourceName; +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.tasks.v2beta2.stub.CloudTasksStub; import com.google.cloud.tasks.v2beta2.stub.CloudTasksStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -1299,6 +1304,71 @@ public final UnaryCallable resumeQueueCallable() { return stub.resumeQueueCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update queue list by uploading a queue.yaml file. + * + *

The queue.yaml file is supplied in the request body as a YAML encoded string. This method + * was added to support gcloud clients versions before 322.0.0. New clients should use CreateQueue + * instead of this method. + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   UploadQueueYamlRequest request =
+   *       UploadQueueYamlRequest.newBuilder()
+   *           .setAppId("appId93028124")
+   *           .setHttpBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   cloudTasksClient.uploadQueueYaml(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 void uploadQueueYaml(UploadQueueYamlRequest request) { + uploadQueueYamlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update queue list by uploading a queue.yaml file. + * + *

The queue.yaml file is supplied in the request body as a YAML encoded string. This method + * was added to support gcloud clients versions before 322.0.0. New clients should use CreateQueue + * instead of this method. + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   UploadQueueYamlRequest request =
+   *       UploadQueueYamlRequest.newBuilder()
+   *           .setAppId("appId93028124")
+   *           .setHttpBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = cloudTasksClient.uploadQueueYamlCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable uploadQueueYamlCallable() { + return stub.uploadQueueYamlCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an @@ -1358,7 +1428,7 @@ public final Policy getIamPolicy(ResourceName resource) { * // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - * String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * Policy response = cloudTasksClient.getIamPolicy(resource); * } * } @@ -1519,7 +1589,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - * String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * Policy policy = Policy.newBuilder().build(); * Policy response = cloudTasksClient.setIamPolicy(resource, policy); * } @@ -1685,7 +1755,7 @@ public final TestIamPermissionsResponse testIamPermissions( * // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - * String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * cloudTasksClient.testIamPermissions(resource, permissions); @@ -2132,10 +2202,10 @@ public final UnaryCallable getTaskCallable() { *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical * to that of an existing task or a task that was deleted or completed recently then the call * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was - * created using Cloud Tasks, then another task with the same name can't be created for ~1hour - * after the original task was deleted or completed. If the task's queue was created using - * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days - * after the original task was deleted or completed. + * created using Cloud Tasks, then another task with the same name can't be created for ~1 + * hour after the original task was deleted or completed. If the task's queue was created + * using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 + * days after the original task was deleted or completed. *

Because there is an extra lookup cost to identify duplicate task names, these * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly * increased latency. Using hashed strings for the task id or for the prefix of the task id is @@ -2196,10 +2266,10 @@ public final Task createTask(QueueName parent, Task task) { *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical * to that of an existing task or a task that was deleted or completed recently then the call * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was - * created using Cloud Tasks, then another task with the same name can't be created for ~1hour - * after the original task was deleted or completed. If the task's queue was created using - * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days - * after the original task was deleted or completed. + * created using Cloud Tasks, then another task with the same name can't be created for ~1 + * hour after the original task was deleted or completed. If the task's queue was created + * using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 + * days after the original task was deleted or completed. *

Because there is an extra lookup cost to identify duplicate task names, these * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly * increased latency. Using hashed strings for the task id or for the prefix of the task id is @@ -3328,6 +3398,325 @@ public final UnaryCallable runTaskCallable() { return stub.runTaskCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   String taskId = "taskId-880873088";
+   *   HttpBody body = HttpBody.newBuilder().build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body);
+   * }
+   * }
+ * + * @param queue Required. The parent queue name. For example: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID + * is assigned to the task. + * @param body Optional. Body of the HTTP request. + *

The body can take any generic value. The value is written to the [HttpRequest][payload] + * of the [Task]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BufferTaskResponse bufferTask(QueueName queue, String taskId, HttpBody body) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(queue == null ? null : queue.toString()) + .setTaskId(taskId) + .setBody(body) + .build(); + return bufferTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   String queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString();
+   *   String taskId = "taskId-880873088";
+   *   HttpBody body = HttpBody.newBuilder().build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body);
+   * }
+   * }
+ * + * @param queue Required. The parent queue name. For example: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID + * is assigned to the task. + * @param body Optional. Body of the HTTP request. + *

The body can take any generic value. The value is written to the [HttpRequest][payload] + * of the [Task]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BufferTaskResponse bufferTask(String queue, String taskId, HttpBody body) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder().setQueue(queue).setTaskId(taskId).setBody(body).build(); + return bufferTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   BufferTaskRequest request =
+   *       BufferTaskRequest.newBuilder()
+   *           .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
+   *           .setTaskId("taskId-880873088")
+   *           .setBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(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 BufferTaskResponse bufferTask(BufferTaskRequest request) { + return bufferTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   BufferTaskRequest request =
+   *       BufferTaskRequest.newBuilder()
+   *           .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
+   *           .setTaskId("taskId-880873088")
+   *           .setBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudTasksClient.bufferTaskCallable().futureCall(request);
+   *   // Do something.
+   *   BufferTaskResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable bufferTaskCallable() { + return stub.bufferTaskCallable(); + } + + // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -3495,4 +3884,80 @@ protected ListTasksFixedSizeCollection createCollection( return new ListTasksFixedSizeCollection(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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java index 0d109253fed4..4bf2422ea102 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta2; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; @@ -31,6 +32,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.tasks.v2beta2.stub.CloudTasksStubSettings; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -123,6 +128,11 @@ public UnaryCallSettings resumeQueueSettings() { return ((CloudTasksStubSettings) getStubSettings()).resumeQueueSettings(); } + /** Returns the object with the settings used for calls to uploadQueueYaml. */ + public UnaryCallSettings uploadQueueYamlSettings() { + return ((CloudTasksStubSettings) getStubSettings()).uploadQueueYamlSettings(); + } + /** Returns the object with the settings used for calls to getIamPolicy. */ public UnaryCallSettings getIamPolicySettings() { return ((CloudTasksStubSettings) getStubSettings()).getIamPolicySettings(); @@ -185,6 +195,22 @@ public UnaryCallSettings runTaskSettings() { return ((CloudTasksStubSettings) getStubSettings()).runTaskSettings(); } + /** Returns the object with the settings used for calls to bufferTask. */ + public UnaryCallSettings bufferTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).bufferTaskSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudTasksStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudTasksStubSettings) getStubSettings()).getLocationSettings(); + } + public static final CloudTasksSettings create(CloudTasksStubSettings stub) throws IOException { return new CloudTasksSettings.Builder(stub.toBuilder()).build(); } @@ -340,6 +366,11 @@ public UnaryCallSettings.Builder resumeQueueSettings( return getStubSettingsBuilder().resumeQueueSettings(); } + /** Returns the builder for the settings used for calls to uploadQueueYaml. */ + public UnaryCallSettings.Builder uploadQueueYamlSettings() { + return getStubSettingsBuilder().uploadQueueYamlSettings(); + } + /** Returns the builder for the settings used for calls to getIamPolicy. */ public UnaryCallSettings.Builder getIamPolicySettings() { return getStubSettingsBuilder().getIamPolicySettings(); @@ -402,6 +433,23 @@ public UnaryCallSettings.Builder runTaskSettings() { return getStubSettingsBuilder().runTaskSettings(); } + /** Returns the builder for the settings used for calls to bufferTask. */ + public UnaryCallSettings.Builder bufferTaskSettings() { + return getStubSettingsBuilder().bufferTaskSettings(); + } + + /** 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 CloudTasksSettings build() throws IOException { return new CloudTasksSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/gapic_metadata.json b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/gapic_metadata.json index c0501ad8ecdd..05edf09d0640 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/gapic_metadata.json +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/gapic_metadata.json @@ -13,6 +13,9 @@ "AcknowledgeTask": { "methods": ["acknowledgeTask", "acknowledgeTask", "acknowledgeTask", "acknowledgeTaskCallable"] }, + "BufferTask": { + "methods": ["bufferTask", "bufferTask", "bufferTask", "bufferTaskCallable"] + }, "CancelLease": { "methods": ["cancelLease", "cancelLease", "cancelLease", "cancelLeaseCallable"] }, @@ -31,6 +34,9 @@ "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetQueue": { "methods": ["getQueue", "getQueue", "getQueue", "getQueueCallable"] }, @@ -40,6 +46,9 @@ "LeaseTasks": { "methods": ["leaseTasks", "leaseTasks", "leaseTasks", "leaseTasksCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListQueues": { "methods": ["listQueues", "listQueues", "listQueues", "listQueuesPagedCallable", "listQueuesCallable"] }, @@ -69,6 +78,9 @@ }, "UpdateQueue": { "methods": ["updateQueue", "updateQueue", "updateQueueCallable"] + }, + "UploadQueueYaml": { + "methods": ["uploadQueueYaml", "uploadQueueYamlCallable"] } } } diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java index 39afe4673d0a..ac361d88b049 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java @@ -16,13 +16,20 @@ package com.google.cloud.tasks.v2beta2.stub; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; 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.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; import com.google.cloud.tasks.v2beta2.CreateQueueRequest; import com.google.cloud.tasks.v2beta2.CreateTaskRequest; @@ -44,6 +51,7 @@ import com.google.cloud.tasks.v2beta2.RunTaskRequest; import com.google.cloud.tasks.v2beta2.Task; import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -98,6 +106,10 @@ public UnaryCallable resumeQueueCallable() { throw new UnsupportedOperationException("Not implemented: resumeQueueCallable()"); } + public UnaryCallable uploadQueueYamlCallable() { + throw new UnsupportedOperationException("Not implemented: uploadQueueYamlCallable()"); + } + public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); } @@ -151,6 +163,23 @@ public UnaryCallable runTaskCallable() { throw new UnsupportedOperationException("Not implemented: runTaskCallable()"); } + public UnaryCallable bufferTaskCallable() { + throw new UnsupportedOperationException("Not implemented: bufferTaskCallable()"); + } + + 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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java index a7a8571c8edb..383f81ae8f1b 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta2.stub; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; @@ -44,7 +45,13 @@ 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.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; import com.google.cloud.tasks.v2beta2.CreateQueueRequest; import com.google.cloud.tasks.v2beta2.CreateTaskRequest; @@ -66,6 +73,7 @@ import com.google.cloud.tasks.v2beta2.RunTaskRequest; import com.google.cloud.tasks.v2beta2.Task; import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -133,6 +141,7 @@ public class CloudTasksStubSettings extends StubSettings private final UnaryCallSettings purgeQueueSettings; private final UnaryCallSettings pauseQueueSettings; private final UnaryCallSettings resumeQueueSettings; + private final UnaryCallSettings uploadQueueYamlSettings; private final UnaryCallSettings getIamPolicySettings; private final UnaryCallSettings setIamPolicySettings; private final UnaryCallSettings @@ -147,6 +156,11 @@ public class CloudTasksStubSettings extends StubSettings private final UnaryCallSettings renewLeaseSettings; private final UnaryCallSettings cancelLeaseSettings; private final UnaryCallSettings runTaskSettings; + private final UnaryCallSettings bufferTaskSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_QUEUES_PAGE_STR_DESC = @@ -220,6 +234,42 @@ public Iterable extractResources(ListTasksResponse 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< ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse> LIST_QUEUES_PAGE_STR_FACT = @@ -254,6 +304,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 listQueues. */ public PagedCallSettings listQueuesSettings() { @@ -295,6 +362,11 @@ public UnaryCallSettings resumeQueueSettings() { return resumeQueueSettings; } + /** Returns the object with the settings used for calls to uploadQueueYaml. */ + public UnaryCallSettings uploadQueueYamlSettings() { + return uploadQueueYamlSettings; + } + /** Returns the object with the settings used for calls to getIamPolicy. */ public UnaryCallSettings getIamPolicySettings() { return getIamPolicySettings; @@ -357,6 +429,22 @@ public UnaryCallSettings runTaskSettings() { return runTaskSettings; } + /** Returns the object with the settings used for calls to bufferTask. */ + public UnaryCallSettings bufferTaskSettings() { + return bufferTaskSettings; + } + + /** 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 CloudTasksStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -471,6 +559,7 @@ protected CloudTasksStubSettings(Builder settingsBuilder) throws IOException { purgeQueueSettings = settingsBuilder.purgeQueueSettings().build(); pauseQueueSettings = settingsBuilder.pauseQueueSettings().build(); resumeQueueSettings = settingsBuilder.resumeQueueSettings().build(); + uploadQueueYamlSettings = settingsBuilder.uploadQueueYamlSettings().build(); getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); @@ -483,6 +572,9 @@ protected CloudTasksStubSettings(Builder settingsBuilder) throws IOException { renewLeaseSettings = settingsBuilder.renewLeaseSettings().build(); cancelLeaseSettings = settingsBuilder.cancelLeaseSettings().build(); runTaskSettings = settingsBuilder.runTaskSettings().build(); + bufferTaskSettings = settingsBuilder.bufferTaskSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for CloudTasksStubSettings. */ @@ -498,6 +590,7 @@ public static class Builder extends StubSettings.Builder purgeQueueSettings; private final UnaryCallSettings.Builder pauseQueueSettings; private final UnaryCallSettings.Builder resumeQueueSettings; + private final UnaryCallSettings.Builder uploadQueueYamlSettings; private final UnaryCallSettings.Builder getIamPolicySettings; private final UnaryCallSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder @@ -514,6 +607,12 @@ public static class Builder extends StubSettings.Builder renewLeaseSettings; private final UnaryCallSettings.Builder cancelLeaseSettings; private final UnaryCallSettings.Builder runTaskSettings; + private final UnaryCallSettings.Builder + bufferTaskSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -527,6 +626,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -554,6 +654,8 @@ public static class Builder extends StubSettings.Builder>of( @@ -595,6 +701,7 @@ protected Builder(ClientContext clientContext) { purgeQueueSettings, pauseQueueSettings, resumeQueueSettings, + uploadQueueYamlSettings, getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, @@ -606,7 +713,10 @@ protected Builder(ClientContext clientContext) { acknowledgeTaskSettings, renewLeaseSettings, cancelLeaseSettings, - runTaskSettings); + runTaskSettings, + bufferTaskSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -621,6 +731,7 @@ protected Builder(CloudTasksStubSettings settings) { purgeQueueSettings = settings.purgeQueueSettings.toBuilder(); pauseQueueSettings = settings.pauseQueueSettings.toBuilder(); resumeQueueSettings = settings.resumeQueueSettings.toBuilder(); + uploadQueueYamlSettings = settings.uploadQueueYamlSettings.toBuilder(); getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); @@ -633,6 +744,9 @@ protected Builder(CloudTasksStubSettings settings) { renewLeaseSettings = settings.renewLeaseSettings.toBuilder(); cancelLeaseSettings = settings.cancelLeaseSettings.toBuilder(); runTaskSettings = settings.runTaskSettings.toBuilder(); + bufferTaskSettings = settings.bufferTaskSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -644,6 +758,7 @@ protected Builder(CloudTasksStubSettings settings) { purgeQueueSettings, pauseQueueSettings, resumeQueueSettings, + uploadQueueYamlSettings, getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, @@ -655,7 +770,10 @@ protected Builder(CloudTasksStubSettings settings) { acknowledgeTaskSettings, renewLeaseSettings, cancelLeaseSettings, - runTaskSettings); + runTaskSettings, + bufferTaskSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -725,6 +843,11 @@ 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 + .uploadQueueYamlSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .getIamPolicySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -785,6 +908,21 @@ 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 + .bufferTaskSettings() + .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; } @@ -844,6 +982,11 @@ public UnaryCallSettings.Builder resumeQueueSettings( return resumeQueueSettings; } + /** Returns the builder for the settings used for calls to uploadQueueYaml. */ + public UnaryCallSettings.Builder uploadQueueYamlSettings() { + return uploadQueueYamlSettings; + } + /** Returns the builder for the settings used for calls to getIamPolicy. */ public UnaryCallSettings.Builder getIamPolicySettings() { return getIamPolicySettings; @@ -906,6 +1049,23 @@ public UnaryCallSettings.Builder runTaskSettings() { return runTaskSettings; } + /** Returns the builder for the settings used for calls to bufferTask. */ + public UnaryCallSettings.Builder bufferTaskSettings() { + return bufferTaskSettings; + } + + /** 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 CloudTasksStubSettings build() throws IOException { return new CloudTasksStubSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java index a50e3ff1c962..2a3514cf5203 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta2.stub; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; @@ -27,7 +28,13 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; import com.google.cloud.tasks.v2beta2.CreateQueueRequest; import com.google.cloud.tasks.v2beta2.CreateTaskRequest; @@ -49,6 +56,7 @@ import com.google.cloud.tasks.v2beta2.RunTaskRequest; import com.google.cloud.tasks.v2beta2.Task; import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -136,6 +144,16 @@ public class GrpcCloudTasksStub extends CloudTasksStub { .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) .build(); + private static final MethodDescriptor + uploadQueueYamlMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/UploadQueueYaml") + .setRequestMarshaller( + ProtoUtils.marshaller(UploadQueueYamlRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor getIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -239,6 +257,34 @@ public class GrpcCloudTasksStub extends CloudTasksStub { .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) .build(); + private static final MethodDescriptor + bufferTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/BufferTask") + .setRequestMarshaller(ProtoUtils.marshaller(BufferTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BufferTaskResponse.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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -248,6 +294,7 @@ public class GrpcCloudTasksStub extends CloudTasksStub { private final UnaryCallable purgeQueueCallable; private final UnaryCallable pauseQueueCallable; private final UnaryCallable resumeQueueCallable; + private final UnaryCallable uploadQueueYamlCallable; private final UnaryCallable getIamPolicyCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable @@ -262,6 +309,11 @@ public class GrpcCloudTasksStub extends CloudTasksStub { private final UnaryCallable renewLeaseCallable; private final UnaryCallable cancelLeaseCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable bufferTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -385,6 +437,10 @@ protected GrpcCloudTasksStub( return builder.build(); }) .build(); + GrpcCallSettings uploadQueueYamlTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(uploadQueueYamlMethodDescriptor) + .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) @@ -506,6 +562,37 @@ protected GrpcCloudTasksStub( return builder.build(); }) .build(); + GrpcCallSettings bufferTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(bufferTaskMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("queue", String.valueOf(request.getQueue())); + builder.add("task_id", String.valueOf(request.getTaskId())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -534,6 +621,9 @@ protected GrpcCloudTasksStub( this.resumeQueueCallable = callableFactory.createUnaryCallable( resumeQueueTransportSettings, settings.resumeQueueSettings(), clientContext); + this.uploadQueueYamlCallable = + callableFactory.createUnaryCallable( + uploadQueueYamlTransportSettings, settings.uploadQueueYamlSettings(), clientContext); this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); @@ -575,6 +665,18 @@ protected GrpcCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), clientContext); + this.bufferTaskCallable = + callableFactory.createUnaryCallable( + bufferTaskTransportSettings, settings.bufferTaskSettings(), 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()); @@ -629,6 +731,11 @@ public UnaryCallable resumeQueueCallable() { return resumeQueueCallable; } + @Override + public UnaryCallable uploadQueueYamlCallable() { + return uploadQueueYamlCallable; + } + @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; @@ -695,6 +802,27 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @Override + public UnaryCallable bufferTaskCallable() { + return bufferTaskCallable; + } + + @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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/HttpJsonCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/HttpJsonCloudTasksStub.java index 77d4f6228d9c..8f92c97db4a5 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/HttpJsonCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/HttpJsonCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta2.stub; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; @@ -32,7 +33,13 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; import com.google.cloud.tasks.v2beta2.CreateQueueRequest; import com.google.cloud.tasks.v2beta2.CreateTaskRequest; @@ -54,6 +61,7 @@ import com.google.cloud.tasks.v2beta2.RunTaskRequest; import com.google.cloud.tasks.v2beta2.Task; import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -799,6 +807,115 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { .build()) .build(); + private static final ApiMethodDescriptor + bufferTaskMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/BufferTask") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta2/{queue=projects/*/locations/*/queues/*}/tasks/{taskId}:buffer", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "queue", request.getQueue()); + serializer.putPathParam(fields, "taskId", request.getTaskId()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearQueue().clearTaskId().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BufferTaskResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .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( + "/v2beta2/{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( + "/v2beta2/{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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -822,6 +939,11 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { private final UnaryCallable renewLeaseCallable; private final UnaryCallable cancelLeaseCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable bufferTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -1086,6 +1208,41 @@ protected HttpJsonCloudTasksStub( return builder.build(); }) .build(); + HttpJsonCallSettings bufferTaskTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(bufferTaskMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("queue", String.valueOf(request.getQueue())); + builder.add("task_id", String.valueOf(request.getTaskId())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -1155,6 +1312,18 @@ protected HttpJsonCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), clientContext); + this.bufferTaskCallable = + callableFactory.createUnaryCallable( + bufferTaskTransportSettings, settings.bufferTaskSettings(), 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()); @@ -1183,6 +1352,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(renewLeaseMethodDescriptor); methodDescriptors.add(cancelLeaseMethodDescriptor); methodDescriptors.add(runTaskMethodDescriptor); + methodDescriptors.add(bufferTaskMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } @@ -1297,6 +1469,33 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @Override + public UnaryCallable bufferTaskCallable() { + return bufferTaskCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable uploadQueueYamlCallable() { + throw new UnsupportedOperationException( + "Not implemented: uploadQueueYamlCallable(). REST transport is not implemented for this method yet."); + } + @Override public final void close() { try { diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java index 5d83fb88125c..ea9114f8d449 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksClient.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta3; +import com.google.api.HttpBody; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; @@ -26,6 +27,10 @@ import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.resourcenames.ResourceName; +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.tasks.v2beta3.stub.CloudTasksStub; import com.google.cloud.tasks.v2beta3.stub.CloudTasksStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -2128,9 +2133,9 @@ public final UnaryCallable getTaskCallable() { *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical * to that of an existing task or a task that was deleted or executed recently then the call * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was - * created using Cloud Tasks, then another task with the same name can't be created for ~1hour - * after the original task was deleted or executed. If the task's queue was created using - * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days + * created using Cloud Tasks, then another task with the same name can't be created for ~1 + * hour after the original task was deleted or executed. If the task's queue was created using + * queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days * after the original task was deleted or executed. *

Because there is an extra lookup cost to identify duplicate task names, these * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly @@ -2190,9 +2195,9 @@ public final Task createTask(QueueName parent, Task task) { *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical * to that of an existing task or a task that was deleted or executed recently then the call * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was - * created using Cloud Tasks, then another task with the same name can't be created for ~1hour - * after the original task was deleted or executed. If the task's queue was created using - * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days + * created using Cloud Tasks, then another task with the same name can't be created for ~1 + * hour after the original task was deleted or executed. If the task's queue was created using + * queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days * after the original task was deleted or executed. *

Because there is an extra lookup cost to identify duplicate task names, these * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly @@ -2598,6 +2603,325 @@ public final UnaryCallable runTaskCallable() { return stub.runTaskCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   String taskId = "taskId-880873088";
+   *   HttpBody body = HttpBody.newBuilder().build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body);
+   * }
+   * }
+ * + * @param queue Required. The parent queue name. For example: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID + * is assigned to the task. + * @param body Optional. Body of the HTTP request. + *

The body can take any generic value. The value is written to the [HttpRequest][payload] + * of the [Task]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BufferTaskResponse bufferTask(QueueName queue, String taskId, HttpBody body) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(queue == null ? null : queue.toString()) + .setTaskId(taskId) + .setBody(body) + .build(); + return bufferTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   String queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString();
+   *   String taskId = "taskId-880873088";
+   *   HttpBody body = HttpBody.newBuilder().build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body);
+   * }
+   * }
+ * + * @param queue Required. The parent queue name. For example: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID + * is assigned to the task. + * @param body Optional. Body of the HTTP request. + *

The body can take any generic value. The value is written to the [HttpRequest][payload] + * of the [Task]. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BufferTaskResponse bufferTask(String queue, String taskId, HttpBody body) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder().setQueue(queue).setTaskId(taskId).setBody(body).build(); + return bufferTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   BufferTaskRequest request =
+   *       BufferTaskRequest.newBuilder()
+   *           .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
+   *           .setTaskId("taskId-880873088")
+   *           .setBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   BufferTaskResponse response = cloudTasksClient.bufferTask(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 BufferTaskResponse bufferTask(BufferTaskRequest request) { + return bufferTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates and buffers a new task without the need to explicitly define a Task message. The queue + * must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the + * task with an automatically generated ID, use the following format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is + * in its experimental stage. You must request access to the API through the [Cloud Tasks + * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + * + *

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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   BufferTaskRequest request =
+   *       BufferTaskRequest.newBuilder()
+   *           .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString())
+   *           .setTaskId("taskId-880873088")
+   *           .setBody(HttpBody.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudTasksClient.bufferTaskCallable().futureCall(request);
+   *   // Do something.
+   *   BufferTaskResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable bufferTaskCallable() { + return stub.bufferTaskCallable(); + } + + // 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudTasksClient.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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + @Override public final void close() { stub.close(); @@ -2765,4 +3089,80 @@ protected ListTasksFixedSizeCollection createCollection( return new ListTasksFixedSizeCollection(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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksSettings.java index 3c71dae6047b..3fcda5f9c4e0 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta3; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; @@ -31,6 +32,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.tasks.v2beta3.stub.CloudTasksStubSettings; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -165,6 +170,22 @@ public UnaryCallSettings runTaskSettings() { return ((CloudTasksStubSettings) getStubSettings()).runTaskSettings(); } + /** Returns the object with the settings used for calls to bufferTask. */ + public UnaryCallSettings bufferTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).bufferTaskSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudTasksStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudTasksStubSettings) getStubSettings()).getLocationSettings(); + } + public static final CloudTasksSettings create(CloudTasksStubSettings stub) throws IOException { return new CloudTasksSettings.Builder(stub.toBuilder()).build(); } @@ -362,6 +383,23 @@ public UnaryCallSettings.Builder runTaskSettings() { return getStubSettingsBuilder().runTaskSettings(); } + /** Returns the builder for the settings used for calls to bufferTask. */ + public UnaryCallSettings.Builder bufferTaskSettings() { + return getStubSettingsBuilder().bufferTaskSettings(); + } + + /** 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 CloudTasksSettings build() throws IOException { return new CloudTasksSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/gapic_metadata.json b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/gapic_metadata.json index 6e066ae00daa..84f7fc75029e 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/gapic_metadata.json +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "CloudTasksClient", "rpcs": { + "BufferTask": { + "methods": ["bufferTask", "bufferTask", "bufferTask", "bufferTaskCallable"] + }, "CreateQueue": { "methods": ["createQueue", "createQueue", "createQueue", "createQueueCallable"] }, @@ -25,12 +28,18 @@ "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetQueue": { "methods": ["getQueue", "getQueue", "getQueue", "getQueueCallable"] }, "GetTask": { "methods": ["getTask", "getTask", "getTask", "getTaskCallable"] }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListQueues": { "methods": ["listQueues", "listQueues", "listQueues", "listQueuesPagedCallable", "listQueuesCallable"] }, diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStub.java index 3d689fc95afe..0c2dd5d22789 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStub.java @@ -16,12 +16,19 @@ package com.google.cloud.tasks.v2beta3.stub; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; 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.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; import com.google.cloud.tasks.v2beta3.CreateQueueRequest; import com.google.cloud.tasks.v2beta3.CreateTaskRequest; import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; @@ -130,6 +137,23 @@ public UnaryCallable runTaskCallable() { throw new UnsupportedOperationException("Not implemented: runTaskCallable()"); } + public UnaryCallable bufferTaskCallable() { + throw new UnsupportedOperationException("Not implemented: bufferTaskCallable()"); + } + + 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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java index 0b7c2c5220f3..a380d51e1de3 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta3.stub; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; @@ -44,6 +45,12 @@ 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.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; import com.google.cloud.tasks.v2beta3.CreateQueueRequest; import com.google.cloud.tasks.v2beta3.CreateTaskRequest; import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; @@ -138,6 +145,11 @@ public class CloudTasksStubSettings extends StubSettings private final UnaryCallSettings createTaskSettings; private final UnaryCallSettings deleteTaskSettings; private final UnaryCallSettings runTaskSettings; + private final UnaryCallSettings bufferTaskSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; private static final PagedListDescriptor LIST_QUEUES_PAGE_STR_DESC = @@ -211,6 +223,42 @@ public Iterable extractResources(ListTasksResponse 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< ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse> LIST_QUEUES_PAGE_STR_FACT = @@ -245,6 +293,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 listQueues. */ public PagedCallSettings listQueuesSettings() { @@ -328,6 +393,22 @@ public UnaryCallSettings runTaskSettings() { return runTaskSettings; } + /** Returns the object with the settings used for calls to bufferTask. */ + public UnaryCallSettings bufferTaskSettings() { + return bufferTaskSettings; + } + + /** 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 CloudTasksStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -450,6 +531,9 @@ protected CloudTasksStubSettings(Builder settingsBuilder) throws IOException { createTaskSettings = settingsBuilder.createTaskSettings().build(); deleteTaskSettings = settingsBuilder.deleteTaskSettings().build(); runTaskSettings = settingsBuilder.runTaskSettings().build(); + bufferTaskSettings = settingsBuilder.bufferTaskSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); } /** Builder for CloudTasksStubSettings. */ @@ -476,6 +560,12 @@ public static class Builder extends StubSettings.Builder createTaskSettings; private final UnaryCallSettings.Builder deleteTaskSettings; private final UnaryCallSettings.Builder runTaskSettings; + private final UnaryCallSettings.Builder + bufferTaskSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -489,6 +579,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -516,6 +607,8 @@ public static class Builder extends StubSettings.Builder>of( @@ -560,7 +656,10 @@ protected Builder(ClientContext clientContext) { getTaskSettings, createTaskSettings, deleteTaskSettings, - runTaskSettings); + runTaskSettings, + bufferTaskSettings, + listLocationsSettings, + getLocationSettings); initDefaults(this); } @@ -583,6 +682,9 @@ protected Builder(CloudTasksStubSettings settings) { createTaskSettings = settings.createTaskSettings.toBuilder(); deleteTaskSettings = settings.deleteTaskSettings.toBuilder(); runTaskSettings = settings.runTaskSettings.toBuilder(); + bufferTaskSettings = settings.bufferTaskSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -601,7 +703,10 @@ protected Builder(CloudTasksStubSettings settings) { getTaskSettings, createTaskSettings, deleteTaskSettings, - runTaskSettings); + runTaskSettings, + bufferTaskSettings, + listLocationsSettings, + getLocationSettings); } private static Builder createDefault() { @@ -711,6 +816,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .bufferTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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; } @@ -812,6 +932,23 @@ public UnaryCallSettings.Builder runTaskSettings() { return runTaskSettings; } + /** Returns the builder for the settings used for calls to bufferTask. */ + public UnaryCallSettings.Builder bufferTaskSettings() { + return bufferTaskSettings; + } + + /** 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 CloudTasksStubSettings build() throws IOException { return new CloudTasksStubSettings(this); diff --git a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/GrpcCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/GrpcCloudTasksStub.java index bd5697edd43c..daec11577cba 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/GrpcCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/GrpcCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta3.stub; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; @@ -27,6 +28,12 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; import com.google.cloud.tasks.v2beta3.CreateQueueRequest; import com.google.cloud.tasks.v2beta3.CreateTaskRequest; import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; @@ -199,6 +206,34 @@ public class GrpcCloudTasksStub extends CloudTasksStub { .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) .build(); + private static final MethodDescriptor + bufferTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta3.CloudTasks/BufferTask") + .setRequestMarshaller(ProtoUtils.marshaller(BufferTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BufferTaskResponse.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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -218,6 +253,11 @@ public class GrpcCloudTasksStub extends CloudTasksStub { private final UnaryCallable createTaskCallable; private final UnaryCallable deleteTaskCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable bufferTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -422,6 +462,37 @@ protected GrpcCloudTasksStub( return builder.build(); }) .build(); + GrpcCallSettings bufferTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(bufferTaskMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("queue", String.valueOf(request.getQueue())); + builder.add("task_id", String.valueOf(request.getTaskId())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -479,6 +550,18 @@ protected GrpcCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), clientContext); + this.bufferTaskCallable = + callableFactory.createUnaryCallable( + bufferTaskTransportSettings, settings.bufferTaskSettings(), 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()); @@ -579,6 +662,27 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @Override + public UnaryCallable bufferTaskCallable() { + return bufferTaskCallable; + } + + @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-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/HttpJsonCloudTasksStub.java b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/HttpJsonCloudTasksStub.java index c18900e78353..db917db04ed1 100644 --- a/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/HttpJsonCloudTasksStub.java +++ b/java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/HttpJsonCloudTasksStub.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2beta3.stub; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; @@ -32,6 +33,12 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; 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.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; import com.google.cloud.tasks.v2beta3.CreateQueueRequest; import com.google.cloud.tasks.v2beta3.CreateTaskRequest; import com.google.cloud.tasks.v2beta3.DeleteQueueRequest; @@ -648,6 +655,115 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { .build()) .build(); + private static final ApiMethodDescriptor + bufferTaskMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.tasks.v2beta3.CloudTasks/BufferTask") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta3/{queue=projects/*/locations/*/queues/*}/tasks/{taskId}:buffer", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "queue", request.getQueue()); + serializer.putPathParam(fields, "taskId", request.getTaskId()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearQueue().clearTaskId().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BufferTaskResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .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( + "/v2beta3/{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( + "/v2beta3/{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 listQueuesCallable; private final UnaryCallable listQueuesPagedCallable; private final UnaryCallable getQueueCallable; @@ -667,6 +783,11 @@ public class HttpJsonCloudTasksStub extends CloudTasksStub { private final UnaryCallable createTaskCallable; private final UnaryCallable deleteTaskCallable; private final UnaryCallable runTaskCallable; + private final UnaryCallable bufferTaskCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -887,6 +1008,41 @@ protected HttpJsonCloudTasksStub( return builder.build(); }) .build(); + HttpJsonCallSettings bufferTaskTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(bufferTaskMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("queue", String.valueOf(request.getQueue())); + builder.add("task_id", String.valueOf(request.getTaskId())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); this.listQueuesCallable = callableFactory.createUnaryCallable( @@ -944,6 +1100,18 @@ protected HttpJsonCloudTasksStub( this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), clientContext); + this.bufferTaskCallable = + callableFactory.createUnaryCallable( + bufferTaskTransportSettings, settings.bufferTaskSettings(), 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()); @@ -968,6 +1136,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(createTaskMethodDescriptor); methodDescriptors.add(deleteTaskMethodDescriptor); methodDescriptors.add(runTaskMethodDescriptor); + methodDescriptors.add(bufferTaskMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } @@ -1062,6 +1233,27 @@ public UnaryCallable runTaskCallable() { return runTaskCallable; } + @Override + public UnaryCallable bufferTaskCallable() { + return bufferTaskCallable; + } + + @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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientHttpJsonTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientHttpJsonTest.java index 289be2e1cb4b..a6d5babe0271 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientHttpJsonTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientHttpJsonTest.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -29,12 +30,17 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.api.resourcenames.ResourceName; +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.tasks.v2.stub.HttpJsonCloudTasksStub; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; import com.google.iam.v1.Binding; import com.google.iam.v1.Policy; import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -43,6 +49,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -1599,4 +1606,120 @@ public void runTaskExceptionTest2() 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientTest.java index f28489607905..554ffe05035d 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/CloudTasksClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.tasks.v2; +import static com.google.cloud.tasks.v2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2.CloudTasksClient.ListTasksPagedResponse; @@ -27,6 +28,10 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.resourcenames.ResourceName; +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.iam.v1.AuditConfig; import com.google.iam.v1.Binding; @@ -36,6 +41,7 @@ import com.google.iam.v1.TestIamPermissionsRequest; import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -45,6 +51,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -58,6 +65,7 @@ @Generated("by gapic-generator-java") public class CloudTasksClientTest { private static MockCloudTasks mockCloudTasks; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudTasksClient client; @@ -65,9 +73,11 @@ public class CloudTasksClientTest { @BeforeClass public static void startStaticServer() { mockCloudTasks = new MockCloudTasks(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudTasks)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudTasks, mockLocations)); mockServiceHelper.start(); } @@ -1410,4 +1420,105 @@ public void runTaskExceptionTest2() 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocations.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocations.java new file mode 100644 index 000000000000..59e6696b71d7 --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.tasks.v2; + +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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocationsImpl.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocationsImpl.java new file mode 100644 index 000000000000..031d753ad3ad --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.tasks.v2; + +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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientHttpJsonTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientHttpJsonTest.java index b16bf268d72f..bf08ed25e3de 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientHttpJsonTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientHttpJsonTest.java @@ -16,9 +16,11 @@ package com.google.cloud.tasks.v2beta2; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; +import com.google.api.HttpBody; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; import com.google.api.gax.httpjson.testing.MockHttpService; @@ -29,12 +31,17 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.api.resourcenames.ResourceName; +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.tasks.v2beta2.stub.HttpJsonCloudTasksStub; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; import com.google.iam.v1.Binding; import com.google.iam.v1.Policy; import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -43,6 +50,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -840,6 +848,12 @@ public void resumeQueueExceptionTest2() throws Exception { } } + @Test + public void uploadQueueYamlUnsupportedMethodTest() throws Exception { + // The uploadQueueYaml() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + @Test public void getIamPolicyTest() throws Exception { Policy expectedResponse = @@ -1963,4 +1977,212 @@ public void runTaskExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void bufferTaskTest() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + 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 bufferTaskExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void bufferTaskTest2() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + String queue = "projects/project-8340/locations/location-8340/queues/queue-8340"; + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + 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 bufferTaskExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String queue = "projects/project-8340/locations/location-8340/queues/queue-8340"; + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java index 5a35758e44bc..a212364fae6f 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java @@ -16,9 +16,11 @@ package com.google.cloud.tasks.v2beta2; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; +import com.google.api.HttpBody; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.testing.LocalChannelProvider; @@ -27,6 +29,10 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.resourcenames.ResourceName; +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.iam.v1.AuditConfig; import com.google.iam.v1.Binding; @@ -36,6 +42,7 @@ import com.google.iam.v1.TestIamPermissionsRequest; import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -45,6 +52,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -58,6 +66,7 @@ @Generated("by gapic-generator-java") public class CloudTasksClientTest { private static MockCloudTasks mockCloudTasks; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudTasksClient client; @@ -65,9 +74,11 @@ public class CloudTasksClientTest { @BeforeClass public static void startStaticServer() { mockCloudTasks = new MockCloudTasks(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudTasks)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudTasks, mockLocations)); mockServiceHelper.start(); } @@ -742,6 +753,49 @@ public void resumeQueueExceptionTest2() throws Exception { } } + @Test + public void uploadQueueYamlTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudTasks.addResponse(expectedResponse); + + UploadQueueYamlRequest request = + UploadQueueYamlRequest.newBuilder() + .setAppId("appId93028124") + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + + client.uploadQueueYaml(request); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UploadQueueYamlRequest actualRequest = ((UploadQueueYamlRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAppId(), actualRequest.getAppId()); + Assert.assertEquals(request.getHttpBody(), actualRequest.getHttpBody()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadQueueYamlExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + UploadQueueYamlRequest request = + UploadQueueYamlRequest.newBuilder() + .setAppId("appId93028124") + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + client.uploadQueueYaml(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getIamPolicyTest() throws Exception { Policy expectedResponse = @@ -1731,4 +1785,189 @@ public void runTaskExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void bufferTaskTest() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BufferTaskRequest actualRequest = ((BufferTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(queue.toString(), actualRequest.getQueue()); + Assert.assertEquals(taskId, actualRequest.getTaskId()); + Assert.assertEquals(body, actualRequest.getBody()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bufferTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void bufferTaskTest2() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockCloudTasks.addResponse(expectedResponse); + + String queue = "queue107944209"; + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BufferTaskRequest actualRequest = ((BufferTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(queue, actualRequest.getQueue()); + Assert.assertEquals(taskId, actualRequest.getTaskId()); + Assert.assertEquals(body, actualRequest.getBody()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bufferTaskExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + String queue = "queue107944209"; + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java index 300f846c79f1..3efce5e207ce 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java @@ -237,6 +237,27 @@ public void resumeQueue( } } + @Override + public void uploadQueueYaml( + UploadQueueYamlRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) 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 UploadQueueYaml, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { Object response = responses.poll(); @@ -481,4 +502,25 @@ public void runTask(RunTaskRequest request, StreamObserver responseObserve Exception.class.getName()))); } } + + @Override + public void bufferTask( + BufferTaskRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BufferTaskResponse) { + requests.add(request); + responseObserver.onNext(((BufferTaskResponse) 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 BufferTask, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BufferTaskResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocations.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocations.java new file mode 100644 index 000000000000..5e080f2724ab --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.tasks.v2beta2; + +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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocationsImpl.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocationsImpl.java new file mode 100644 index 000000000000..138f6278dba9 --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.tasks.v2beta2; + +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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientHttpJsonTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientHttpJsonTest.java index b657b8c6cd23..763bc13d8049 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientHttpJsonTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientHttpJsonTest.java @@ -16,9 +16,11 @@ package com.google.cloud.tasks.v2beta3; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; +import com.google.api.HttpBody; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; import com.google.api.gax.httpjson.testing.MockHttpService; @@ -29,12 +31,17 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.api.resourcenames.ResourceName; +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.tasks.v2beta3.stub.HttpJsonCloudTasksStub; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; import com.google.iam.v1.Binding; import com.google.iam.v1.Policy; import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -43,6 +50,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import javax.annotation.Generated; import org.junit.After; @@ -191,6 +199,7 @@ public void getQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -242,6 +251,7 @@ public void getQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -293,6 +303,7 @@ public void createQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -346,6 +357,7 @@ public void createQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -399,6 +411,7 @@ public void updateQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -412,6 +425,7 @@ public void updateQueueTest() throws Exception { Queue queue = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -451,6 +465,7 @@ public void updateQueueExceptionTest() throws Exception { Queue queue = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -552,6 +567,7 @@ public void purgeQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -603,6 +619,7 @@ public void purgeQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -654,6 +671,7 @@ public void pauseQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -705,6 +723,7 @@ public void pauseQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -756,6 +775,7 @@ public void resumeQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -807,6 +827,7 @@ public void resumeQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -1625,4 +1646,212 @@ public void runTaskExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void bufferTaskTest() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + 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 bufferTaskExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void bufferTaskTest2() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + String queue = "projects/project-8340/locations/location-8340/queues/queue-8340"; + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + 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 bufferTaskExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String queue = "projects/project-8340/locations/location-8340/queues/queue-8340"; + String taskId = "taskId-1910"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientTest.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientTest.java index 7b0d817bf7c8..301d50ab2eab 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientTest.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/CloudTasksClientTest.java @@ -16,9 +16,11 @@ package com.google.cloud.tasks.v2beta3; +import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListLocationsPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListQueuesPagedResponse; import static com.google.cloud.tasks.v2beta3.CloudTasksClient.ListTasksPagedResponse; +import com.google.api.HttpBody; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.testing.LocalChannelProvider; @@ -27,6 +29,10 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.resourcenames.ResourceName; +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.iam.v1.AuditConfig; import com.google.iam.v1.Binding; @@ -36,6 +42,7 @@ import com.google.iam.v1.TestIamPermissionsRequest; import com.google.iam.v1.TestIamPermissionsResponse; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -45,6 +52,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import javax.annotation.Generated; @@ -58,6 +66,7 @@ @Generated("by gapic-generator-java") public class CloudTasksClientTest { private static MockCloudTasks mockCloudTasks; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudTasksClient client; @@ -65,9 +74,11 @@ public class CloudTasksClientTest { @BeforeClass public static void startStaticServer() { mockCloudTasks = new MockCloudTasks(); + mockLocations = new MockLocations(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudTasks)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudTasks, mockLocations)); mockServiceHelper.start(); } @@ -186,6 +197,7 @@ public void getQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -231,6 +243,7 @@ public void getQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -276,6 +289,7 @@ public void createQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -324,6 +338,7 @@ public void createQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -372,6 +387,7 @@ public void updateQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -488,6 +504,7 @@ public void purgeQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -533,6 +550,7 @@ public void purgeQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -578,6 +596,7 @@ public void pauseQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -623,6 +642,7 @@ public void pauseQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -668,6 +688,7 @@ public void resumeQueueTest() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -713,6 +734,7 @@ public void resumeQueueTest2() throws Exception { Queue expectedResponse = Queue.newBuilder() .setName(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setHttpTarget(HttpTarget.newBuilder().build()) .setRateLimits(RateLimits.newBuilder().build()) .setRetryConfig(RetryConfig.newBuilder().build()) .setPurgeTime(Timestamp.newBuilder().build()) @@ -1432,4 +1454,189 @@ public void runTaskExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void bufferTaskTest() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BufferTaskRequest actualRequest = ((BufferTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(queue.toString(), actualRequest.getQueue()); + Assert.assertEquals(taskId, actualRequest.getTaskId()); + Assert.assertEquals(body, actualRequest.getBody()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bufferTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void bufferTaskTest2() throws Exception { + BufferTaskResponse expectedResponse = + BufferTaskResponse.newBuilder().setTask(Task.newBuilder().build()).build(); + mockCloudTasks.addResponse(expectedResponse); + + String queue = "queue107944209"; + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + + BufferTaskResponse actualResponse = client.bufferTask(queue, taskId, body); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BufferTaskRequest actualRequest = ((BufferTaskRequest) actualRequests.get(0)); + + Assert.assertEquals(queue, actualRequest.getQueue()); + Assert.assertEquals(taskId, actualRequest.getTaskId()); + Assert.assertEquals(body, actualRequest.getBody()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bufferTaskExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + String queue = "queue107944209"; + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + client.bufferTask(queue, taskId, body); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // 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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockCloudTasksImpl.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockCloudTasksImpl.java index 27d8a3cbce93..d24f5e2c5431 100644 --- a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockCloudTasksImpl.java +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockCloudTasksImpl.java @@ -399,4 +399,25 @@ public void runTask(RunTaskRequest request, StreamObserver responseObserve Exception.class.getName()))); } } + + @Override + public void bufferTask( + BufferTaskRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BufferTaskResponse) { + requests.add(request); + responseObserver.onNext(((BufferTaskResponse) 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 BufferTask, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BufferTaskResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocations.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocations.java new file mode 100644 index 000000000000..4ac20e53b6af --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.tasks.v2beta3; + +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-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocationsImpl.java b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocationsImpl.java new file mode 100644 index 000000000000..d4f27e2fa411 --- /dev/null +++ b/java-tasks/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta3/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.tasks.v2beta3; + +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-tasks/grpc-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksGrpc.java b/java-tasks/grpc-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksGrpc.java index 09cd95f77552..55208f441376 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksGrpc.java +++ b/java-tasks/grpc-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CloudTasksGrpc.java @@ -766,8 +766,8 @@ default void getQueue( *
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -791,8 +791,8 @@ default void createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -854,9 +854,10 @@ default void purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * 
*/ default void pauseQueue( @@ -872,9 +873,10 @@ default void pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -913,8 +915,8 @@ default void getIamPolicy( * * *
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
+     * Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -934,9 +936,10 @@ default void setIamPolicy(
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this
+     * will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -955,10 +958,10 @@ default void testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
+     * retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1019,20 +1022,22 @@ default void deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to
+     * retry a failed task after a fix has been made or to manually force a task
+     * to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to
+     * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was
+     * called plus the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1115,8 +1120,8 @@ public void getQueue(
      * 
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1142,8 +1147,8 @@ public void createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1210,9 +1215,10 @@ public void purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * 
*/ public void pauseQueue( @@ -1229,9 +1235,10 @@ public void pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1274,8 +1281,8 @@ public void getIamPolicy( * * *
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
+     * Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1297,9 +1304,10 @@ public void setIamPolicy(
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this
+     * will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1320,10 +1328,10 @@ public void testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
+     * retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1388,20 +1396,22 @@ public void deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to
+     * retry a failed task after a fix has been made or to manually force a task
+     * to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to
+     * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was
+     * called plus the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1468,8 +1478,8 @@ public com.google.cloud.tasks.v2.Queue getQueue(
      * 
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1492,8 +1502,8 @@ public com.google.cloud.tasks.v2.Queue createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1553,9 +1563,10 @@ public com.google.cloud.tasks.v2.Queue purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * 
*/ public com.google.cloud.tasks.v2.Queue pauseQueue( @@ -1571,9 +1582,10 @@ public com.google.cloud.tasks.v2.Queue pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1609,8 +1621,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque * * *
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
+     * Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1628,9 +1640,10 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this
+     * will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1647,10 +1660,10 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
+     * retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1711,20 +1724,22 @@ public com.google.protobuf.Empty deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to
+     * retry a failed task after a fix has been made or to manually force a task
+     * to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to
+     * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was
+     * called plus the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1790,8 +1805,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      * 
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1814,8 +1829,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1875,9 +1890,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1893,9 +1909,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1932,8 +1949,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * * *
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue].
+     * Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1952,9 +1969,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this
+     * will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1972,10 +1990,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is
+     * retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -2037,20 +2055,22 @@ public com.google.common.util.concurrent.ListenableFuture * Forces a task to run now. * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or - * is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed - * task after a fix has been made or to manually force a task to be - * dispatched now. + * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to + * retry a failed task after a fix has been made or to manually force a task + * to be dispatched now. * The dispatched task is returned. That is, the task that is returned * contains the [status][Task.status] after the task is dispatched but * before the task is received by its target. * If Cloud Tasks receives a successful response from the task's * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that - * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified - * in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to + * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig]. * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a * task that has already succeeded or permanently failed. diff --git a/java-tasks/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java b/java-tasks/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java index 488ad5b6f73e..7aaeb89522e4 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java +++ b/java-tasks/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java @@ -375,6 +375,49 @@ private CloudTasksGrpc() {} return getResumeQueueMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest, com.google.protobuf.Empty> + getUploadQueueYamlMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UploadQueueYaml", + requestType = com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest, com.google.protobuf.Empty> + getUploadQueueYamlMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest, com.google.protobuf.Empty> + getUploadQueueYamlMethod; + if ((getUploadQueueYamlMethod = CloudTasksGrpc.getUploadQueueYamlMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getUploadQueueYamlMethod = CloudTasksGrpc.getUploadQueueYamlMethod) == null) { + CloudTasksGrpc.getUploadQueueYamlMethod = + getUploadQueueYamlMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UploadQueueYaml")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new CloudTasksMethodDescriptorSupplier("UploadQueueYaml")) + .build(); + } + } + } + return getUploadQueueYamlMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> getGetIamPolicyMethod; @@ -877,6 +920,52 @@ private CloudTasksGrpc() {} return getRunTaskMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.BufferTaskRequest, + com.google.cloud.tasks.v2beta2.BufferTaskResponse> + getBufferTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BufferTask", + requestType = com.google.cloud.tasks.v2beta2.BufferTaskRequest.class, + responseType = com.google.cloud.tasks.v2beta2.BufferTaskResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.BufferTaskRequest, + com.google.cloud.tasks.v2beta2.BufferTaskResponse> + getBufferTaskMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta2.BufferTaskRequest, + com.google.cloud.tasks.v2beta2.BufferTaskResponse> + getBufferTaskMethod; + if ((getBufferTaskMethod = CloudTasksGrpc.getBufferTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getBufferTaskMethod = CloudTasksGrpc.getBufferTaskMethod) == null) { + CloudTasksGrpc.getBufferTaskMethod = + getBufferTaskMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BufferTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.BufferTaskRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.BufferTaskResponse + .getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("BufferTask")) + .build(); + } + } + } + return getBufferTaskMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CloudTasksStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1087,6 +1176,23 @@ default void resumeQueue( getResumeQueueMethod(), responseObserver); } + /** + * + * + *
+     * Update queue list by uploading a queue.yaml file.
+     * The queue.yaml file is supplied in the request body as a YAML encoded
+     * string. This method was added to support gcloud clients versions before
+     * 322.0.0. New clients should use CreateQueue instead of this method.
+     * 
+ */ + default void uploadQueueYaml( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUploadQueueYamlMethod(), responseObserver); + } + /** * * @@ -1345,6 +1451,30 @@ default void runTask( io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunTaskMethod(), responseObserver); } + + /** + * + * + *
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + default void bufferTask( + com.google.cloud.tasks.v2beta2.BufferTaskRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBufferTaskMethod(), responseObserver); + } } /** @@ -1553,6 +1683,25 @@ public void resumeQueue( responseObserver); } + /** + * + * + *
+     * Update queue list by uploading a queue.yaml file.
+     * The queue.yaml file is supplied in the request body as a YAML encoded
+     * string. This method was added to support gcloud clients versions before
+     * 322.0.0. New clients should use CreateQueue instead of this method.
+     * 
+ */ + public void uploadQueueYaml( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUploadQueueYamlMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1828,6 +1977,31 @@ public void runTask( io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRunTaskMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + public void bufferTask( + com.google.cloud.tasks.v2beta2.BufferTaskRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBufferTaskMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -2005,6 +2179,22 @@ public com.google.cloud.tasks.v2beta2.Queue resumeQueue( getChannel(), getResumeQueueMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Update queue list by uploading a queue.yaml file.
+     * The queue.yaml file is supplied in the request body as a YAML encoded
+     * string. This method was added to support gcloud clients versions before
+     * 322.0.0. New clients should use CreateQueue instead of this method.
+     * 
+ */ + public com.google.protobuf.Empty uploadQueueYaml( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUploadQueueYamlMethod(), getCallOptions(), request); + } + /** * * @@ -2253,6 +2443,29 @@ public com.google.cloud.tasks.v2beta2.Task runTask( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRunTaskMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.BufferTaskResponse bufferTask( + com.google.cloud.tasks.v2beta2.BufferTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBufferTaskMethod(), getCallOptions(), request); + } } /** @@ -2430,6 +2643,22 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption getChannel().newCall(getResumeQueueMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Update queue list by uploading a queue.yaml file.
+     * The queue.yaml file is supplied in the request body as a YAML encoded
+     * string. This method was added to support gcloud clients versions before
+     * 322.0.0. New clients should use CreateQueue instead of this method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + uploadQueueYaml(com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUploadQueueYamlMethod(), getCallOptions()), request); + } + /** * * @@ -2683,6 +2912,30 @@ public com.google.common.util.concurrent.ListenableFuture + * Creates and buffers a new task without the need to explicitly define a Task + * message. The queue must have [HTTP + * target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer + * To create the task with an automatically generated ID, use the following + * format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. + * Note: This feature is in its experimental stage. You must request access to + * the API through the [Cloud Tasks BufferTask Experiment Signup + * form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + *
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.tasks.v2beta2.BufferTaskResponse> + bufferTask(com.google.cloud.tasks.v2beta2.BufferTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBufferTaskMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_QUEUES = 0; @@ -2693,18 +2946,20 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2764,6 +3019,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.tasks.v2beta2.ResumeQueueRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPLOAD_QUEUE_YAML: + serviceImpl.uploadQueueYaml( + (com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_IAM_POLICY: serviceImpl.getIamPolicy( (com.google.iam.v1.GetIamPolicyRequest) request, @@ -2827,6 +3087,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.tasks.v2beta2.RunTaskRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BUFFER_TASK: + serviceImpl.bufferTask( + (com.google.cloud.tasks.v2beta2.BufferTaskRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -2894,6 +3160,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.tasks.v2beta2.ResumeQueueRequest, com.google.cloud.tasks.v2beta2.Queue>(service, METHODID_RESUME_QUEUE))) + .addMethod( + getUploadQueueYamlMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest, + com.google.protobuf.Empty>(service, METHODID_UPLOAD_QUEUE_YAML))) .addMethod( getGetIamPolicyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2967,6 +3239,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.tasks.v2beta2.RunTaskRequest, com.google.cloud.tasks.v2beta2.Task>(service, METHODID_RUN_TASK))) + .addMethod( + getBufferTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.BufferTaskRequest, + com.google.cloud.tasks.v2beta2.BufferTaskResponse>( + service, METHODID_BUFFER_TASK))) .build(); } @@ -3026,6 +3305,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getPurgeQueueMethod()) .addMethod(getPauseQueueMethod()) .addMethod(getResumeQueueMethod()) + .addMethod(getUploadQueueYamlMethod()) .addMethod(getGetIamPolicyMethod()) .addMethod(getSetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) @@ -3038,6 +3318,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRenewLeaseMethod()) .addMethod(getCancelLeaseMethod()) .addMethod(getRunTaskMethod()) + .addMethod(getBufferTaskMethod()) .build(); } } diff --git a/java-tasks/grpc-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksGrpc.java b/java-tasks/grpc-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksGrpc.java index 8aa177d9669b..b8183d1c98ad 100644 --- a/java-tasks/grpc-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksGrpc.java +++ b/java-tasks/grpc-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksGrpc.java @@ -704,6 +704,52 @@ private CloudTasksGrpc() {} return getRunTaskMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta3.BufferTaskRequest, + com.google.cloud.tasks.v2beta3.BufferTaskResponse> + getBufferTaskMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BufferTask", + requestType = com.google.cloud.tasks.v2beta3.BufferTaskRequest.class, + responseType = com.google.cloud.tasks.v2beta3.BufferTaskResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta3.BufferTaskRequest, + com.google.cloud.tasks.v2beta3.BufferTaskResponse> + getBufferTaskMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.tasks.v2beta3.BufferTaskRequest, + com.google.cloud.tasks.v2beta3.BufferTaskResponse> + getBufferTaskMethod; + if ((getBufferTaskMethod = CloudTasksGrpc.getBufferTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getBufferTaskMethod = CloudTasksGrpc.getBufferTaskMethod) == null) { + CloudTasksGrpc.getBufferTaskMethod = + getBufferTaskMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BufferTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta3.BufferTaskRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta3.BufferTaskResponse + .getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("BufferTask")) + .build(); + } + } + } + return getBufferTaskMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CloudTasksStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -788,8 +834,8 @@ default void getQueue( *
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -813,8 +859,8 @@ default void createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -876,9 +922,10 @@ default void purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta3.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * 
*/ default void pauseQueue( @@ -894,9 +941,11 @@ default void pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -915,9 +964,9 @@ default void resumeQueue( * * *
-     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
+     * Gets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the
+     * resource exists and does not have a policy set.
      * Authorization requires the following
      * [Google IAM](https://cloud.google.com/iam) permission on the specified
      * resource parent:
@@ -935,8 +984,8 @@ default void getIamPolicy(
      *
      *
      * 
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -956,9 +1005,10 @@ default void setIamPolicy(
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist,
+     * this will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -977,10 +1027,10 @@ default void testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]
+     * view is retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1042,20 +1092,23 @@ default void deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be
+     * used to retry a failed task after a fix has been made or to manually force
+     * a task to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be
+     * reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus
+     * the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
      * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1066,6 +1119,30 @@ default void runTask(
         io.grpc.stub.StreamObserver responseObserver) {
       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRunTaskMethod(), responseObserver);
     }
+
+    /**
+     *
+     *
+     * 
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + default void bufferTask( + com.google.cloud.tasks.v2beta3.BufferTaskRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBufferTaskMethod(), responseObserver); + } } /** @@ -1138,8 +1215,8 @@ public void getQueue( *
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1165,8 +1242,8 @@ public void createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1233,9 +1310,10 @@ public void purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta3.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * 
*/ public void pauseQueue( @@ -1252,9 +1330,11 @@ public void pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1275,9 +1355,9 @@ public void resumeQueue( * * *
-     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
+     * Gets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the
+     * resource exists and does not have a policy set.
      * Authorization requires the following
      * [Google IAM](https://cloud.google.com/iam) permission on the specified
      * resource parent:
@@ -1297,8 +1377,8 @@ public void getIamPolicy(
      *
      *
      * 
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1320,9 +1400,10 @@ public void setIamPolicy(
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist,
+     * this will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1343,10 +1424,10 @@ public void testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]
+     * view is retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1412,20 +1493,23 @@ public void deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be
+     * used to retry a failed task after a fix has been made or to manually force
+     * a task to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be
+     * reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus
+     * the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
      * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1437,6 +1521,31 @@ public void runTask(
       io.grpc.stub.ClientCalls.asyncUnaryCall(
           getChannel().newCall(getRunTaskMethod(), getCallOptions()), request, responseObserver);
     }
+
+    /**
+     *
+     *
+     * 
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + public void bufferTask( + com.google.cloud.tasks.v2beta3.BufferTaskRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBufferTaskMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -1492,8 +1601,8 @@ public com.google.cloud.tasks.v2beta3.Queue getQueue( *
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1516,8 +1625,8 @@ public com.google.cloud.tasks.v2beta3.Queue createQueue(
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1577,9 +1686,10 @@ public com.google.cloud.tasks.v2beta3.Queue purgeQueue(
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta3.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * 
*/ public com.google.cloud.tasks.v2beta3.Queue pauseQueue( @@ -1595,9 +1705,11 @@ public com.google.cloud.tasks.v2beta3.Queue pauseQueue( * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1615,9 +1727,9 @@ public com.google.cloud.tasks.v2beta3.Queue resumeQueue( * * *
-     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
+     * Gets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the
+     * resource exists and does not have a policy set.
      * Authorization requires the following
      * [Google IAM](https://cloud.google.com/iam) permission on the specified
      * resource parent:
@@ -1633,8 +1745,8 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque
      *
      *
      * 
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1652,9 +1764,10 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist,
+     * this will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1671,10 +1784,10 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]
+     * view is retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -1735,20 +1848,23 @@ public com.google.protobuf.Empty deleteTask( *
      * Forces a task to run now.
      * When this method is called, Cloud Tasks will dispatch the task, even if
-     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or
-     * is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * the task is already running, the queue has reached its
+     * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * This command is meant to be used for manual debugging. For
-     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed
-     * task after a fix has been made or to manually force a task to be
-     * dispatched now.
+     * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be
+     * used to retry a failed task after a fix has been made or to manually force
+     * a task to be dispatched now.
      * The dispatched task is returned. That is, the task that is returned
      * contains the [status][Task.status] after the task is dispatched but
      * before the task is received by its target.
      * If Cloud Tasks receives a successful response from the task's
      * target, then the task will be deleted; otherwise the task's
-     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that
-     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified
-     * in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
+     * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be
+     * reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus
+     * the retry delay specified in the queue's
+     * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig].
      * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns
      * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
      * task that has already succeeded or permanently failed.
@@ -1759,6 +1875,29 @@ public com.google.cloud.tasks.v2beta3.Task runTask(
       return io.grpc.stub.ClientCalls.blockingUnaryCall(
           getChannel(), getRunTaskMethod(), getCallOptions(), request);
     }
+
+    /**
+     *
+     *
+     * 
+     * Creates and buffers a new task without the need to explicitly define a Task
+     * message. The queue must have [HTTP
+     * target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a
+     * custom ID, use the following format and set TASK_ID to your desired ID:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer
+     * To create the task with an automatically generated ID, use the following
+     * format:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer.
+     * Note: This feature is in its experimental stage. You must request access to
+     * the API through the [Cloud Tasks BufferTask Experiment Signup
+     * form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
+     * 
+ */ + public com.google.cloud.tasks.v2beta3.BufferTaskResponse bufferTask( + com.google.cloud.tasks.v2beta3.BufferTaskRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBufferTaskMethod(), getCallOptions(), request); + } } /** @@ -1814,8 +1953,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption *
      * Creates a queue.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1838,8 +1977,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      * This method creates the queue if it does not exist and updates
      * the queue if it does exist.
      * Queues created with this method allow tasks to live for a maximum of 31
-     * days. After a task is 31 days old, the task will be deleted regardless of whether
-     * it was dispatched or not.
+     * days. After a task is 31 days old, the task will be deleted regardless of
+     * whether it was dispatched or not.
      * WARNING: Using this method may have unintended side effects if you are
      * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
      * Read
@@ -1899,9 +2038,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      * Pauses the queue.
      * If a queue is paused then the system will stop dispatching tasks
      * until the queue is resumed via
-     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
-     * when the queue is paused. A queue is paused if its
-     * [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
+     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can
+     * still be added when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta3.Queue.state] is
+     * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture @@ -1917,9 +2057,11 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * Resume a queue. * This method resumes a queue after it has been * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored - * in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it - * will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS * queues, follow the 500/50/5 pattern described in @@ -1937,9 +2079,9 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * * *
-     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * Returns an empty policy if the resource exists and does not have a policy
-     * set.
+     * Gets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the
+     * resource exists and does not have a policy set.
      * Authorization requires the following
      * [Google IAM](https://cloud.google.com/iam) permission on the specified
      * resource parent:
@@ -1956,8 +2098,8 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      *
      * 
-     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing
-     * policy.
+     * Sets the access control policy for a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy.
      * Note: The Cloud Console does not check queue-level IAM permissions yet.
      * Project-level permissions are required to use the Cloud Console.
      * Authorization requires the following
@@ -1976,9 +2118,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      *
      * 
-     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue].
-     * If the resource does not exist, this will return an empty set of
-     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Returns permissions that a caller has on a
+     * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist,
+     * this will return an empty set of permissions, not a
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
      * Note: This operation is designed to be used for building permission-aware
      * UIs and command-line tools, not for authorization checking. This operation
      * may "fail open" without warning.
@@ -1996,10 +2139,10 @@ protected CloudTasksFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      * 
      * Lists the tasks in a queue.
-     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved
-     * due to performance considerations;
-     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the
-     * subset of information which is returned.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]
+     * view is retrieved due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view]
+     * controls the subset of information which is returned.
      * The tasks may be returned in any order. The ordering may change at any
      * time.
      * 
@@ -2061,20 +2204,23 @@ public com.google.common.util.concurrent.ListenableFuture * Forces a task to run now. * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or - * is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed - * task after a fix has been made or to manually force a task to be - * dispatched now. + * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be + * used to retry a failed task after a fix has been made or to manually force + * a task to be dispatched now. * The dispatched task is returned. That is, the task that is returned * contains the [status][Task.status] after the task is dispatched but * before the task is received by its target. * If Cloud Tasks receives a successful response from the task's * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that - * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified - * in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be + * reset to the time that + * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus + * the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a * task that has already succeeded or permanently failed. @@ -2085,6 +2231,30 @@ public com.google.common.util.concurrent.ListenableFuture + * Creates and buffers a new task without the need to explicitly define a Task + * message. The queue must have [HTTP + * target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + * custom ID, use the following format and set TASK_ID to your desired ID: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer + * To create the task with an automatically generated ID, use the following + * format: + * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. + * Note: This feature is in its experimental stage. You must request access to + * the API through the [Cloud Tasks BufferTask Experiment Signup + * form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + *
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.tasks.v2beta3.BufferTaskResponse> + bufferTask(com.google.cloud.tasks.v2beta3.BufferTaskRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBufferTaskMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_QUEUES = 0; @@ -2103,6 +2273,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2204,6 +2375,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.tasks.v2beta3.RunTaskRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BUFFER_TASK: + serviceImpl.bufferTask( + (com.google.cloud.tasks.v2beta3.BufferTaskRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -2319,6 +2496,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.tasks.v2beta3.RunTaskRequest, com.google.cloud.tasks.v2beta3.Task>(service, METHODID_RUN_TASK))) + .addMethod( + getBufferTaskMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta3.BufferTaskRequest, + com.google.cloud.tasks.v2beta3.BufferTaskResponse>( + service, METHODID_BUFFER_TASK))) .build(); } @@ -2386,6 +2570,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateTaskMethod()) .addMethod(getDeleteTaskMethod()) .addMethod(getRunTaskMethod()) + .addMethod(getBufferTaskMethod()) .build(); } } diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequest.java index d16f17b99d50..ea8dbcad2739 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequest.java @@ -53,9 +53,10 @@ * or task-level: * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this value + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. * * * The `url` that the task will be sent to is: @@ -146,14 +147,11 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -171,14 +169,11 @@ public int getHttpMethodValue() { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -201,9 +196,10 @@ public com.google.cloud.tasks.v2.HttpMethod getHttpMethod() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -221,9 +217,10 @@ public boolean hasAppEngineRouting() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -243,9 +240,10 @@ public com.google.cloud.tasks.v2.AppEngineRouting getAppEngineRouting() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -853,9 +851,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * or task-level: * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this value + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. * * * The `url` that the task will be sent to is: @@ -1154,14 +1153,11 @@ public Builder mergeFrom( * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -1179,14 +1175,11 @@ public int getHttpMethodValue() { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -1207,14 +1200,11 @@ public Builder setHttpMethodValue(int value) { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -1234,14 +1224,11 @@ public com.google.cloud.tasks.v2.HttpMethod getHttpMethod() { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -1265,14 +1252,11 @@ public Builder setHttpMethod(com.google.cloud.tasks.v2.HttpMethod value) { * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -1299,9 +1283,10 @@ public Builder clearHttpMethod() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1318,9 +1303,10 @@ public boolean hasAppEngineRouting() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1343,9 +1329,10 @@ public com.google.cloud.tasks.v2.AppEngineRouting getAppEngineRouting() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1370,9 +1357,10 @@ public Builder setAppEngineRouting(com.google.cloud.tasks.v2.AppEngineRouting va * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1395,9 +1383,10 @@ public Builder setAppEngineRouting( * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1426,9 +1415,10 @@ public Builder mergeAppEngineRouting(com.google.cloud.tasks.v2.AppEngineRouting * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1450,9 +1440,10 @@ public Builder clearAppEngineRouting() { * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1469,9 +1460,10 @@ public com.google.cloud.tasks.v2.AppEngineRouting.Builder getAppEngineRoutingBui * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -1492,9 +1484,10 @@ public com.google.cloud.tasks.v2.AppEngineRoutingOrBuilder getAppEngineRoutingOr * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequestOrBuilder.java index af62a72046de..02a5e4757d78 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/AppEngineHttpRequestOrBuilder.java @@ -30,14 +30,11 @@ public interface AppEngineHttpRequestOrBuilder * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -52,14 +49,11 @@ public interface AppEngineHttpRequestOrBuilder * The HTTP method to use for the request. The default is POST. * * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). *
* * .google.cloud.tasks.v2.HttpMethod http_method = 1; @@ -75,9 +69,10 @@ public interface AppEngineHttpRequestOrBuilder * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -92,9 +87,10 @@ public interface AppEngineHttpRequestOrBuilder * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; @@ -109,9 +105,10 @@ public interface AppEngineHttpRequestOrBuilder * Task-level setting for App Engine routing. * * * If [app_engine_routing_override is set on the - * queue][Queue.app_engine_routing_override], this value is used for all - * tasks in the queue, no matter what the setting is for the [task-level - * app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. *
* * .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequest.java index 97ccec865a31..efb97db10f7d 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
+ * Request message for
+ * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.CreateQueueRequest} @@ -135,7 +136,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -152,7 +154,8 @@ public boolean hasQueue() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -169,7 +172,8 @@ public com.google.cloud.tasks.v2.Queue getQueue() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -356,7 +360,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
+   * Request message for
+   * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.CreateQueueRequest} @@ -704,7 +709,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -721,7 +727,8 @@ public boolean hasQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -742,7 +749,8 @@ public com.google.cloud.tasks.v2.Queue getQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -767,7 +775,8 @@ public Builder setQueue(com.google.cloud.tasks.v2.Queue value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -789,7 +798,8 @@ public Builder setQueue(com.google.cloud.tasks.v2.Queue.Builder builderForValue) *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -817,7 +827,8 @@ public Builder mergeQueue(com.google.cloud.tasks.v2.Queue value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -839,7 +850,8 @@ public Builder clearQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -856,7 +868,8 @@ public com.google.cloud.tasks.v2.Queue.Builder getQueueBuilder() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -875,7 +888,8 @@ public com.google.cloud.tasks.v2.QueueOrBuilder getQueueOrBuilder() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+     * existing queue.
      * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequestOrBuilder.java index 855f1682c46a..2d43f2566eea 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateQueueRequestOrBuilder.java @@ -68,7 +68,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -82,7 +83,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -96,7 +98,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an
+   * existing queue.
    * 
* * .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequest.java index 6fb16597d9ae..0a89230c1d72 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
+ * Request message for
+ * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.CreateTaskRequest} @@ -134,13 +135,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -155,10 +156,10 @@ public com.google.protobuf.ByteString getParentBytes() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -181,13 +182,13 @@ public boolean hasTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -202,10 +203,10 @@ public boolean hasTask() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -228,13 +229,13 @@ public com.google.cloud.tasks.v2.Task getTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -249,10 +250,10 @@ public com.google.cloud.tasks.v2.Task getTask() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -272,11 +273,11 @@ public com.google.cloud.tasks.v2.TaskOrBuilder getTaskOrBuilder() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -298,11 +299,11 @@ public int getResponseViewValue() {
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -509,7 +510,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    *
    * 
-   * Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
+   * Request message for
+   * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.CreateTaskRequest} @@ -862,13 +864,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -883,10 +885,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -908,13 +910,13 @@ public boolean hasTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -929,10 +931,10 @@ public boolean hasTask() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -958,13 +960,13 @@ public com.google.cloud.tasks.v2.Task getTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -979,10 +981,10 @@ public com.google.cloud.tasks.v2.Task getTask() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1012,13 +1014,13 @@ public Builder setTask(com.google.cloud.tasks.v2.Task value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1033,10 +1035,10 @@ public Builder setTask(com.google.cloud.tasks.v2.Task value) { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1063,13 +1065,13 @@ public Builder setTask(com.google.cloud.tasks.v2.Task.Builder builderForValue) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1084,10 +1086,10 @@ public Builder setTask(com.google.cloud.tasks.v2.Task.Builder builderForValue) { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1120,13 +1122,13 @@ public Builder mergeTask(com.google.cloud.tasks.v2.Task value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1141,10 +1143,10 @@ public Builder mergeTask(com.google.cloud.tasks.v2.Task value) { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1171,13 +1173,13 @@ public Builder clearTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1192,10 +1194,10 @@ public Builder clearTask() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1217,13 +1219,13 @@ public com.google.cloud.tasks.v2.Task.Builder getTaskBuilder() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1238,10 +1240,10 @@ public com.google.cloud.tasks.v2.Task.Builder getTaskBuilder() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1265,13 +1267,13 @@ public com.google.cloud.tasks.v2.TaskOrBuilder getTaskOrBuilder() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1286,10 +1288,10 @@ public com.google.cloud.tasks.v2.TaskOrBuilder getTaskOrBuilder() { * for ~9days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1320,11 +1322,11 @@ public com.google.cloud.tasks.v2.TaskOrBuilder getTaskOrBuilder() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -1346,11 +1348,11 @@ public int getResponseViewValue() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -1375,11 +1377,11 @@ public Builder setResponseViewValue(int value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -1403,11 +1405,11 @@ public com.google.cloud.tasks.v2.Task.View getResponseView() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -1435,11 +1437,11 @@ public Builder setResponseView(com.google.cloud.tasks.v2.Task.View value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequestOrBuilder.java
index b2cca5e85509..dde836f1440a 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequestOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/CreateTaskRequestOrBuilder.java
@@ -66,13 +66,13 @@ public interface CreateTaskRequestOrBuilder
    *
    * Task names have the following format:
    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
-   * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a
-   * name is not specified then the system will generate a random
-   * unique task id, which will be set in the task returned in the
-   * [response][google.cloud.tasks.v2.Task.name].
+   * The user can optionally specify a task
+   * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then
+   * the system will generate a random unique task id, which will be set in the
+   * task returned in the [response][google.cloud.tasks.v2.Task.name].
    *
-   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the
-   * past then Cloud Tasks will set it to the current time.
+   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or
+   * is in the past then Cloud Tasks will set it to the current time.
    *
    * Task De-duplication:
    *
@@ -87,10 +87,10 @@ public interface CreateTaskRequestOrBuilder
    * for ~9days after the original task was deleted or executed.
    *
    * Because there is an extra lookup cost to identify duplicate task
-   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly
-   * increased latency. Using hashed strings for the task id or for
-   * the prefix of the task id is recommended. Choosing task ids that
-   * are sequential or have sequential prefixes, for example using a
+   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]
+   * calls have significantly increased latency. Using hashed strings for the
+   * task id or for the prefix of the task id is recommended. Choosing task ids
+   * that are sequential or have sequential prefixes, for example using a
    * timestamp, causes an increase in latency and error rates in all
    * task commands. The infrastructure relies on an approximately
    * uniform distribution of task ids to store and serve tasks
@@ -110,13 +110,13 @@ public interface CreateTaskRequestOrBuilder
    *
    * Task names have the following format:
    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
-   * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a
-   * name is not specified then the system will generate a random
-   * unique task id, which will be set in the task returned in the
-   * [response][google.cloud.tasks.v2.Task.name].
+   * The user can optionally specify a task
+   * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then
+   * the system will generate a random unique task id, which will be set in the
+   * task returned in the [response][google.cloud.tasks.v2.Task.name].
    *
-   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the
-   * past then Cloud Tasks will set it to the current time.
+   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or
+   * is in the past then Cloud Tasks will set it to the current time.
    *
    * Task De-duplication:
    *
@@ -131,10 +131,10 @@ public interface CreateTaskRequestOrBuilder
    * for ~9days after the original task was deleted or executed.
    *
    * Because there is an extra lookup cost to identify duplicate task
-   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly
-   * increased latency. Using hashed strings for the task id or for
-   * the prefix of the task id is recommended. Choosing task ids that
-   * are sequential or have sequential prefixes, for example using a
+   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]
+   * calls have significantly increased latency. Using hashed strings for the
+   * task id or for the prefix of the task id is recommended. Choosing task ids
+   * that are sequential or have sequential prefixes, for example using a
    * timestamp, causes an increase in latency and error rates in all
    * task commands. The infrastructure relies on an approximately
    * uniform distribution of task ids to store and serve tasks
@@ -154,13 +154,13 @@ public interface CreateTaskRequestOrBuilder
    *
    * Task names have the following format:
    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
-   * The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a
-   * name is not specified then the system will generate a random
-   * unique task id, which will be set in the task returned in the
-   * [response][google.cloud.tasks.v2.Task.name].
+   * The user can optionally specify a task
+   * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then
+   * the system will generate a random unique task id, which will be set in the
+   * task returned in the [response][google.cloud.tasks.v2.Task.name].
    *
-   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the
-   * past then Cloud Tasks will set it to the current time.
+   * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or
+   * is in the past then Cloud Tasks will set it to the current time.
    *
    * Task De-duplication:
    *
@@ -175,10 +175,10 @@ public interface CreateTaskRequestOrBuilder
    * for ~9days after the original task was deleted or executed.
    *
    * Because there is an extra lookup cost to identify duplicate task
-   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly
-   * increased latency. Using hashed strings for the task id or for
-   * the prefix of the task id is recommended. Choosing task ids that
-   * are sequential or have sequential prefixes, for example using a
+   * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]
+   * calls have significantly increased latency. Using hashed strings for the
+   * task id or for the prefix of the task id is recommended. Choosing task ids
+   * that are sequential or have sequential prefixes, for example using a
    * timestamp, causes an increase in latency and error rates in all
    * task commands. The infrastructure relies on an approximately
    * uniform distribution of task ids to store and serve tasks
@@ -193,11 +193,11 @@ public interface CreateTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -216,11 +216,11 @@ public interface CreateTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequest.java
index dd241ae3f4e1..663fd269225a 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequest.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/DeleteQueueRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
+ * Request message for
+ * [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.DeleteQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
+   * Request message for
+   * [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.DeleteQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequest.java index b1cd9bb7cb15..c275a907fa2d 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
+ * Request message for getting a task using
+ * [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.GetTaskRequest} @@ -126,11 +127,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -152,11 +153,11 @@ public int getResponseViewValue() {
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -348,7 +349,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    *
    *
    * 
-   * Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
+   * Request message for getting a task using
+   * [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.GetTaskRequest} @@ -665,11 +667,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -691,11 +693,11 @@ public int getResponseViewValue() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -720,11 +722,11 @@ public Builder setResponseViewValue(int value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -748,11 +750,11 @@ public com.google.cloud.tasks.v2.Task.View getResponseView() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -780,11 +782,11 @@ public Builder setResponseView(com.google.cloud.tasks.v2.Task.View value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequestOrBuilder.java
index c9e88c213e10..6f3f678e0128 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequestOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/GetTaskRequestOrBuilder.java
@@ -58,11 +58,11 @@ public interface GetTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -81,11 +81,11 @@ public interface GetTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequest.java
index e93f7767b353..9fc6fdbc875f 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequest.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+ * Request message for
+ * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.ListQueuesRequest} @@ -129,11 +130,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -162,11 +162,10 @@ public java.lang.String getFilter() {
    *
    *
    * 
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -203,8 +202,8 @@ public com.google.protobuf.ByteString getFilterBytes() {
    * The maximum page size is 9800. If unspecified, the page size will
    * be the maximum. Fewer queues than requested might be returned,
    * even if more queues exist; use the
-   * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the
-   * response to determine if more queues exist.
+   * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token]
+   * in the response to determine if more queues exist.
    * 
* * int32 page_size = 3; @@ -228,10 +227,12 @@ public int getPageSize() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -258,10 +259,12 @@ public java.lang.String getPageToken() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -471,7 +474,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+   * Request message for
+   * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.ListQueuesRequest} @@ -818,11 +822,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -850,11 +853,10 @@ public java.lang.String getFilter() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -882,11 +884,10 @@ public com.google.protobuf.ByteString getFilterBytes() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -913,11 +914,10 @@ public Builder setFilter(java.lang.String value) {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -940,11 +940,10 @@ public Builder clearFilter() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -979,8 +978,8 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
      * The maximum page size is 9800. If unspecified, the page size will
      * be the maximum. Fewer queues than requested might be returned,
      * even if more queues exist; use the
-     * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the
-     * response to determine if more queues exist.
+     * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token]
+     * in the response to determine if more queues exist.
      * 
* * int32 page_size = 3; @@ -1000,8 +999,8 @@ public int getPageSize() { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the - * response to determine if more queues exist. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. *
* * int32 page_size = 3; @@ -1025,8 +1024,8 @@ public Builder setPageSize(int value) { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the - * response to determine if more queues exist. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. *
* * int32 page_size = 3; @@ -1049,10 +1048,12 @@ public Builder clearPageSize() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -1078,10 +1079,12 @@ public java.lang.String getPageToken() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -1107,10 +1110,12 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -1135,10 +1140,12 @@ public Builder setPageToken(java.lang.String value) { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -1159,10 +1166,12 @@ public Builder clearPageToken() { * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequestOrBuilder.java index 22d000e01bf0..b6b5b1c42f1c 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesRequestOrBuilder.java @@ -58,11 +58,10 @@ public interface ListQueuesRequestOrBuilder * * *
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -80,11 +79,10 @@ public interface ListQueuesRequestOrBuilder
    *
    *
    * 
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -108,8 +106,8 @@ public interface ListQueuesRequestOrBuilder
    * The maximum page size is 9800. If unspecified, the page size will
    * be the maximum. Fewer queues than requested might be returned,
    * even if more queues exist; use the
-   * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the
-   * response to determine if more queues exist.
+   * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token]
+   * in the response to determine if more queues exist.
    * 
* * int32 page_size = 3; @@ -126,10 +124,12 @@ public interface ListQueuesRequestOrBuilder * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; @@ -145,10 +145,12 @@ public interface ListQueuesRequestOrBuilder * * 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.tasks.v2.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. *
* * string page_token = 4; diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponse.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponse.java index ad2240e099d2..4e07c1800d7f 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponse.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponse.java @@ -22,7 +22,8 @@ * * *
- * Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+ * Response message for
+ * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.ListQueuesResponse} @@ -145,8 +146,8 @@ public com.google.cloud.tasks.v2.QueueOrBuilder getQueuesOrBuilder(int index) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -176,8 +177,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -375,7 +376,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
+   * Response message for
+   * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.ListQueuesResponse} @@ -966,8 +968,8 @@ public java.util.List getQueuesBuilderL * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -996,8 +998,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -1026,8 +1028,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -1055,8 +1057,8 @@ public Builder setNextPageToken(java.lang.String value) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -1080,8 +1082,8 @@ public Builder clearNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponseOrBuilder.java index 4bc02328d944..9e68ef21d910 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponseOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListQueuesResponseOrBuilder.java @@ -81,8 +81,8 @@ public interface ListQueuesResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * @@ -101,8 +101,8 @@ public interface ListQueuesResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - * [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. * diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequest.java index 5becc4cabb62..7222528fb058 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+ * Request message for listing tasks using
+ * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.ListTasksRequest} @@ -127,11 +128,11 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -153,11 +154,11 @@ public int getResponseViewValue() {
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -187,8 +188,8 @@ public com.google.cloud.tasks.v2.Task.View getResponseView() {
    * Maximum page size.
    *
    * Fewer tasks than requested might be returned, even if more tasks exist; use
-   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to
-   * determine if more tasks exist.
+   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+   * in the response to determine if more tasks exist.
    *
    * The maximum page size is 1000. If unspecified, the page size will be the
    * maximum.
@@ -215,9 +216,9 @@ public int getPageSize() {
    *
    * 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.tasks.v2.ListTasksResponse.next_page_token] returned
-   * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]
-   * method.
+   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+   * returned from the previous call to
+   * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method.
    *
    * The page token is valid for only 2 hours.
    * 
@@ -246,9 +247,9 @@ public java.lang.String getPageToken() { * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -460,7 +461,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+   * Request message for listing tasks using
+   * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.ListTasksRequest} @@ -805,11 +807,11 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -831,11 +833,11 @@ public int getResponseViewValue() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -860,11 +862,11 @@ public Builder setResponseViewValue(int value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -888,11 +890,11 @@ public com.google.cloud.tasks.v2.Task.View getResponseView() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -920,11 +922,11 @@ public Builder setResponseView(com.google.cloud.tasks.v2.Task.View value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -953,8 +955,8 @@ public Builder clearResponseView() {
      * Maximum page size.
      *
      * Fewer tasks than requested might be returned, even if more tasks exist; use
-     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to
-     * determine if more tasks exist.
+     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+     * in the response to determine if more tasks exist.
      *
      * The maximum page size is 1000. If unspecified, the page size will be the
      * maximum.
@@ -975,8 +977,8 @@ public int getPageSize() {
      * Maximum page size.
      *
      * Fewer tasks than requested might be returned, even if more tasks exist; use
-     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to
-     * determine if more tasks exist.
+     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+     * in the response to determine if more tasks exist.
      *
      * The maximum page size is 1000. If unspecified, the page size will be the
      * maximum.
@@ -1001,8 +1003,8 @@ public Builder setPageSize(int value) {
      * Maximum page size.
      *
      * Fewer tasks than requested might be returned, even if more tasks exist; use
-     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to
-     * determine if more tasks exist.
+     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+     * in the response to determine if more tasks exist.
      *
      * The maximum page size is 1000. If unspecified, the page size will be the
      * maximum.
@@ -1028,9 +1030,9 @@ public Builder clearPageSize() {
      *
      * 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.tasks.v2.ListTasksResponse.next_page_token] returned
-     * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]
-     * method.
+     * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+     * returned from the previous call to
+     * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method.
      *
      * The page token is valid for only 2 hours.
      * 
@@ -1058,9 +1060,9 @@ public java.lang.String getPageToken() { * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1088,9 +1090,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1117,9 +1119,9 @@ public Builder setPageToken(java.lang.String value) { * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1142,9 +1144,9 @@ public Builder clearPageToken() { * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequestOrBuilder.java index b0dab0fe8bc0..6dc989d1a300 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksRequestOrBuilder.java @@ -58,11 +58,11 @@ public interface ListTasksRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -81,11 +81,11 @@ public interface ListTasksRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -108,8 +108,8 @@ public interface ListTasksRequestOrBuilder
    * Maximum page size.
    *
    * Fewer tasks than requested might be returned, even if more tasks exist; use
-   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to
-   * determine if more tasks exist.
+   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+   * in the response to determine if more tasks exist.
    *
    * The maximum page size is 1000. If unspecified, the page size will be the
    * maximum.
@@ -129,9 +129,9 @@ public interface ListTasksRequestOrBuilder
    *
    * 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.tasks.v2.ListTasksResponse.next_page_token] returned
-   * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]
-   * method.
+   * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token]
+   * returned from the previous call to
+   * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method.
    *
    * The page token is valid for only 2 hours.
    * 
@@ -149,9 +149,9 @@ public interface ListTasksRequestOrBuilder * * 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.tasks.v2.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponse.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponse.java index 2e1daf537172..a83785159f2c 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponse.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponse.java @@ -22,7 +22,8 @@ * * *
- * Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+ * Response message for listing tasks using
+ * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.ListTasksResponse} @@ -144,8 +145,8 @@ public com.google.cloud.tasks.v2.TaskOrBuilder getTasksOrBuilder(int index) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -173,8 +174,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -370,7 +371,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
+   * Response message for listing tasks using
+   * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.ListTasksResponse} @@ -960,8 +962,8 @@ public java.util.List getTasksBuilderLis * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -988,8 +990,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -1016,8 +1018,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -1043,8 +1045,8 @@ public Builder setNextPageToken(java.lang.String value) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -1066,8 +1068,8 @@ public Builder clearNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponseOrBuilder.java index 1ca3d86736b7..4b1c86d0ee24 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponseOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ListTasksResponseOrBuilder.java @@ -81,8 +81,8 @@ public interface ListTasksResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
@@ -99,8 +99,8 @@ public interface ListTasksResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - * [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequest.java index 5415b74eb085..f203cdffe361 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PauseQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
+ * Request message for
+ * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.PauseQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
+   * Request message for
+   * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.PauseQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequest.java index fdaaedc04070..dba5b02195d3 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/PurgeQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
+ * Request message for
+ * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.PurgeQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
+   * Request message for
+   * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.PurgeQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java index 5149c7b420a2..4225efc0f696 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java @@ -673,7 +673,7 @@ public com.google.cloud.tasks.v2.RetryConfigOrBuilder getRetryConfigOrBuilder() *
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by called
+   * `state` can only be changed by calling
    * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
    * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -695,7 +695,7 @@ public int getStateValue() {
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by called
+   * `state` can only be changed by calling
    * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
    * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -2553,7 +2553,7 @@ public com.google.cloud.tasks.v2.RetryConfigOrBuilder getRetryConfigOrBuilder()
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by called
+     * `state` can only be changed by calling
      * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
      * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -2575,7 +2575,7 @@ public int getStateValue() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by called
+     * `state` can only be changed by calling
      * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
      * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -2600,7 +2600,7 @@ public Builder setStateValue(int value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by called
+     * `state` can only be changed by calling
      * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
      * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -2624,7 +2624,7 @@ public com.google.cloud.tasks.v2.Queue.State getState() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by called
+     * `state` can only be changed by calling
      * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
      * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -2652,7 +2652,7 @@ public Builder setState(com.google.cloud.tasks.v2.Queue.State value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by called
+     * `state` can only be changed by calling
      * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
      * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
index ebb35f8d2a7d..0e3b96bf6707 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
@@ -335,7 +335,7 @@ public interface QueueOrBuilder
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by called
+   * `state` can only be changed by calling
    * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
    * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
@@ -354,7 +354,7 @@ public interface QueueOrBuilder
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by called
+   * `state` can only be changed by calling
    * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading
    * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequest.java
index 23e1e89abb8d..4eca26b9d5cc 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequest.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/ResumeQueueRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
+ * Request message for
+ * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.ResumeQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
+   * Request message for
+   * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.ResumeQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfig.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfig.java index ea11888d00db..a411a8f83c9e 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfig.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfig.java @@ -387,7 +387,7 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. * @@ -1950,7 +1950,7 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. * @@ -1991,7 +1991,7 @@ public int getMaxDoublings() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. * @@ -2036,7 +2036,7 @@ public Builder setMaxDoublings(int value) { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. * diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfigOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfigOrBuilder.java index d649d9261649..64d500d3a5bf 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfigOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RetryConfigOrBuilder.java @@ -304,7 +304,7 @@ public interface RetryConfigOrBuilder * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. * diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequest.java index 1a44734ac8b1..203ea30775a0 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequest.java @@ -127,11 +127,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -153,11 +153,11 @@ public int getResponseViewValue() {
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -667,11 +667,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -693,11 +693,11 @@ public int getResponseViewValue() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -722,11 +722,11 @@ public Builder setResponseViewValue(int value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -750,11 +750,11 @@ public com.google.cloud.tasks.v2.Task.View getResponseView() {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
@@ -782,11 +782,11 @@ public Builder setResponseView(com.google.cloud.tasks.v2.Task.View value) {
      *
      *
      * 
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-     * returned.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2.Task] will be returned.
      *
-     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
+     * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+     * not all information is retrieved by default because some data, such as
      * payloads, might be desirable to return only when needed because
      * of its large size or because of the sensitivity of data that it
      * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequestOrBuilder.java
index 9845f23b9d38..e7be660817d6 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequestOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/RunTaskRequestOrBuilder.java
@@ -58,11 +58,11 @@ public interface RunTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
@@ -81,11 +81,11 @@ public interface RunTaskRequestOrBuilder
    *
    *
    * 
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
+   * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC];
+   * not all information is retrieved by default because some data, such as
    * payloads, might be desirable to return only when needed because
    * of its large size or because of the sensitivity of data that it
    * contains.
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
index c11de2c15593..0df9504719a9 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
@@ -629,8 +629,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
@@ -676,8 +676,8 @@ public boolean hasDispatchDeadline() {
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
@@ -725,8 +725,8 @@ public com.google.protobuf.Duration getDispatchDeadline() {
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
@@ -2713,8 +2713,8 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -2759,8 +2759,8 @@ public boolean hasDispatchDeadline() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -2811,8 +2811,8 @@ public com.google.protobuf.Duration getDispatchDeadline() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -2865,8 +2865,8 @@ public Builder setDispatchDeadline(com.google.protobuf.Duration value) {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -2916,8 +2916,8 @@ public Builder setDispatchDeadline(com.google.protobuf.Duration.Builder builderF
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -2973,8 +2973,8 @@ public Builder mergeDispatchDeadline(com.google.protobuf.Duration value) {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -3024,8 +3024,8 @@ public Builder clearDispatchDeadline() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -3070,8 +3070,8 @@ public com.google.protobuf.Duration.Builder getDispatchDeadlineBuilder() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
@@ -3120,8 +3120,8 @@ public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() {
      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
      *
-     * Note that when the request is cancelled, Cloud Tasks will stop listing for
-     * the response, but whether the worker stops processing depends on the
+     * Note that when the request is cancelled, Cloud Tasks will stop listening
+     * for the response, but whether the worker stops processing depends on the
      * worker. For example, if the worker is stuck, it may not react to cancelled
      * requests.
      *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
index e307fda6f0ee..1a37fba67528 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
@@ -267,8 +267,8 @@ public interface TaskOrBuilder
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
@@ -311,8 +311,8 @@ public interface TaskOrBuilder
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
@@ -355,8 +355,8 @@ public interface TaskOrBuilder
    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
    *
-   * Note that when the request is cancelled, Cloud Tasks will stop listing for
-   * the response, but whether the worker stops processing depends on the
+   * Note that when the request is cancelled, Cloud Tasks will stop listening
+   * for the response, but whether the worker stops processing depends on the
    * worker. For example, if the worker is stuck, it may not react to cancelled
    * requests.
    *
diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequest.java
index c0ecb013dae0..62b611a0caa3 100644
--- a/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequest.java
+++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/UpdateQueueRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
+ * Request message for
+ * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2.UpdateQueueRequest} @@ -358,7 +359,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
+   * Request message for
+   * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2.UpdateQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/cloudtasks.proto b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/cloudtasks.proto index 803b3214084f..6973d356d520 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/cloudtasks.proto +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 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"; @@ -38,7 +37,8 @@ option objc_class_prefix = "TASKS"; // work in their applications. service CloudTasks { option (google.api.default_host) = "cloudtasks.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 queues. // @@ -61,8 +61,8 @@ service CloudTasks { // Creates a queue. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -84,8 +84,8 @@ service CloudTasks { // the queue if it does exist. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -139,9 +139,10 @@ service CloudTasks { // // If a queue is paused then the system will stop dispatching tasks // until the queue is resumed via - // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can still be added - // when the queue is paused. A queue is paused if its - // [state][google.cloud.tasks.v2.Queue.state] is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can + // still be added when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2.Queue.state] is + // [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. rpc PauseQueue(PauseQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2/{name=projects/*/locations/*/queues/*}:pause" @@ -154,9 +155,10 @@ service CloudTasks { // // This method resumes a queue after it has been // [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - // [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a queue is stored - // in the queue's [state][google.cloud.tasks.v2.Queue.state]; after calling this method it - // will be set to [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + // [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + // queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + // after calling this method it will be set to + // [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. // // WARNING: Resuming many high-QPS queues at the same time can // lead to target overloading. If you are resuming high-QPS @@ -180,7 +182,8 @@ service CloudTasks { // resource parent: // // * `cloudtasks.queues.getIamPolicy` - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" @@ -188,8 +191,8 @@ service CloudTasks { option (google.api.method_signature) = "resource"; } - // Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing - // policy. + // Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + // Replaces any existing policy. // // Note: The Cloud Console does not check queue-level IAM permissions yet. // Project-level permissions are required to use the Cloud Console. @@ -199,7 +202,8 @@ service CloudTasks { // resource parent: // // * `cloudtasks.queues.setIamPolicy` - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" @@ -207,14 +211,16 @@ service CloudTasks { option (google.api.method_signature) = "resource,policy"; } - // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2.Queue]. - // If the resource does not exist, this will return an empty set of - // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // Returns permissions that a caller has on a + // [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this + // will return an empty set of permissions, not a + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. // // Note: This operation is designed to be used for building permission-aware // UIs and command-line tools, not for authorization checking. This operation // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" @@ -224,10 +230,10 @@ service CloudTasks { // Lists the tasks in a queue. // - // By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is retrieved - // due to performance considerations; - // [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] controls the - // subset of information which is returned. + // By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is + // retrieved due to performance considerations; + // [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] + // controls the subset of information which is returned. // // The tasks may be returned in any order. The ordering may change at any // time. @@ -274,13 +280,14 @@ service CloudTasks { // Forces a task to run now. // // When this method is called, Cloud Tasks will dispatch the task, even if - // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits] or - // is [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + // the task is already running, the queue has reached its + // [RateLimits][google.cloud.tasks.v2.RateLimits] or is + // [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. // // This command is meant to be used for manual debugging. For - // example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to retry a failed - // task after a fix has been made or to manually force a task to be - // dispatched now. + // example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to + // retry a failed task after a fix has been made or to manually force a task + // to be dispatched now. // // The dispatched task is returned. That is, the task that is returned // contains the [status][Task.status] after the task is dispatched but @@ -288,9 +295,10 @@ service CloudTasks { // // If Cloud Tasks receives a successful response from the task's // target, then the task will be deleted; otherwise the task's - // [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to the time that - // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was called plus the retry delay specified - // in the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + // [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to + // the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was + // called plus the retry delay specified in the queue's + // [RetryConfig][google.cloud.tasks.v2.RetryConfig]. // // [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a @@ -304,7 +312,8 @@ service CloudTasks { } } -// Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. +// Request message for +// [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. message ListQueuesRequest { // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -315,11 +324,10 @@ message ListQueuesRequest { } ]; - // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2.Queue] - // field can be used as a filter and several operators as supported. - // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - // described in - // [Stackdriver's Advanced Logs + // `filter` can be used to specify a subset of queues. Any + // [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + // several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + // filter syntax is the same as described in [Stackdriver's Advanced Logs // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). // // Sample filter "state: PAUSED". @@ -333,22 +341,25 @@ message ListQueuesRequest { // The maximum page size is 9800. If unspecified, the page size will // be the maximum. Fewer queues than requested might be returned, // even if more queues exist; use the - // [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] in the - // response to determine if more queues exist. + // [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + // in the response to determine if more queues exist. int32 page_size = 3; // A token identifying the page of results to 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.tasks.v2.ListQueuesResponse.next_page_token] returned - // from the previous call to [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] - // method. It is an error to switch the value of the - // [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating through pages. + // [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + // returned from the previous call to + // [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + // error to switch the value of the + // [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + // through pages. string page_token = 4; } -// Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. +// Response message for +// [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. message ListQueuesResponse { // The list of queues. repeated Queue queues = 1; @@ -356,8 +367,8 @@ message ListQueuesResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value as the - // [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + // [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + // as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. // // If the next_page_token is empty, there are no more results. // @@ -377,7 +388,8 @@ message GetQueueRequest { ]; } -// Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue]. +// Request message for +// [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue]. message CreateQueueRequest { // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -394,11 +406,13 @@ message CreateQueueRequest { // Required. The queue to create. // - // [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an existing queue. + // [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + // existing queue. Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue]. +// Request message for +// [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue]. message UpdateQueueRequest { // Required. The queue to create or update. // @@ -415,7 +429,8 @@ message UpdateQueueRequest { google.protobuf.FieldMask update_mask = 2; } -// Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. +// Request message for +// [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. message DeleteQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -427,7 +442,8 @@ message DeleteQueueRequest { ]; } -// Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue]. +// Request message for +// [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue]. message PurgeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -439,7 +455,8 @@ message PurgeQueueRequest { ]; } -// Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue]. +// Request message for +// [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue]. message PauseQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -451,7 +468,8 @@ message PauseQueueRequest { ]; } -// Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. +// Request message for +// [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. message ResumeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -463,7 +481,8 @@ message ResumeQueueRequest { ]; } -// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. +// Request message for listing tasks using +// [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. message ListTasksRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -474,11 +493,11 @@ message ListTasksRequest { } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as + // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + // not all information is retrieved by default because some data, such as // payloads, might be desirable to return only when needed because // of its large size or because of the sensitivity of data that it // contains. @@ -491,8 +510,8 @@ message ListTasksRequest { // Maximum page size. // // Fewer tasks than requested might be returned, even if more tasks exist; use - // [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] in the response to - // determine if more tasks exist. + // [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + // in the response to determine if more tasks exist. // // The maximum page size is 1000. If unspecified, the page size will be the // maximum. @@ -502,15 +521,16 @@ message ListTasksRequest { // // 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.tasks.v2.ListTasksResponse.next_page_token] returned - // from the previous call to [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] - // method. + // [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + // returned from the previous call to + // [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. // // The page token is valid for only 2 hours. string page_token = 4; } -// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. +// Response message for listing tasks using +// [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. message ListTasksResponse { // The list of tasks. repeated Task tasks = 1; @@ -518,29 +538,28 @@ message ListTasksResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as the - // [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + // [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + // the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. // // If the next_page_token is empty, there are no more results. string next_page_token = 2; } -// Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask]. +// Request message for getting a task using +// [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask]. message GetTaskRequest { // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as + // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + // not all information is retrieved by default because some data, such as // payloads, might be desirable to return only when needed because // of its large size or because of the sensitivity of data that it // contains. @@ -551,7 +570,8 @@ message GetTaskRequest { Task.View response_view = 2; } -// Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. +// Request message for +// [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. message CreateTaskRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -568,13 +588,13 @@ message CreateTaskRequest { // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - // The user can optionally specify a task [name][google.cloud.tasks.v2.Task.name]. If a - // name is not specified then the system will generate a random - // unique task id, which will be set in the task returned in the - // [response][google.cloud.tasks.v2.Task.name]. + // The user can optionally specify a task + // [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + // the system will generate a random unique task id, which will be set in the + // task returned in the [response][google.cloud.tasks.v2.Task.name]. // - // If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or is in the - // past then Cloud Tasks will set it to the current time. + // If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + // is in the past then Cloud Tasks will set it to the current time. // // Task De-duplication: // @@ -589,21 +609,21 @@ message CreateTaskRequest { // for ~9days after the original task was deleted or executed. // // Because there is an extra lookup cost to identify duplicate task - // names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] calls have significantly - // increased latency. Using hashed strings for the task id or for - // the prefix of the task id is recommended. Choosing task ids that - // are sequential or have sequential prefixes, for example using a + // names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + // calls have significantly increased latency. Using hashed strings for the + // task id or for the prefix of the task id is recommended. Choosing task ids + // that are sequential or have sequential prefixes, for example using a // timestamp, causes an increase in latency and error rates in all // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. Task task = 2 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as + // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + // not all information is retrieved by default because some data, such as // payloads, might be desirable to return only when needed because // of its large size or because of the sensitivity of data that it // contains. @@ -621,9 +641,7 @@ message DeleteTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; } @@ -634,16 +652,14 @@ message RunTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as + // By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + // not all information is retrieved by default because some data, such as // payloads, might be desirable to return only when needed because // of its large size or because of the sensitivity of data that it // contains. diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto index 3a0828773f54..9c7b06230eac 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 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"; @@ -152,7 +151,7 @@ message Queue { // Output only. The state of the queue. // - // `state` can only be changed by called + // `state` can only be changed by calling // [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). @@ -336,7 +335,7 @@ message RetryConfig { // A task's retry interval starts at // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles // `max_doublings` times, then increases linearly, and finally - // retries retries at intervals of + // retries at intervals of // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. // diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto index 0e1768b63ffa..2440e9a87744 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 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"; @@ -166,9 +165,10 @@ message HttpRequest { // or task-level: // // * If [app_engine_routing_override is set on the -// queue][Queue.app_engine_routing_override], this value is used for all -// tasks in the queue, no matter what the setting is for the [task-level -// app_engine_routing][AppEngineHttpRequest.app_engine_routing]. +// queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this value +// is used for all tasks in the queue, no matter what the setting is for the +// [task-level +// app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -202,22 +202,20 @@ message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // // The app's request handler for the task's target URL must be able to handle - // HTTP requests with this http_method, otherwise the task attempt will fail - // with error code 405 (Method Not Allowed). See - // [Writing a push task request + // HTTP requests with this http_method, otherwise the task attempt fails with + // error code 405 (Method Not Allowed). See [Writing a push task request // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - // and the documentation for the request handlers in the language your app is - // written in e.g. - // [Python Request - // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + // and the App Engine documentation for your runtime on [How Requests are + // Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). HttpMethod http_method = 1; // Task-level setting for App Engine routing. // // * If [app_engine_routing_override is set on the - // queue][Queue.app_engine_routing_override], this value is used for all - // tasks in the queue, no matter what the setting is for the [task-level - // app_engine_routing][AppEngineHttpRequest.app_engine_routing]. + // queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + // value is used for all tasks in the queue, no matter what the setting is + // for the [task-level + // app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing = 2; // The relative URI. diff --git a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/task.proto b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/task.proto index 6616de29c3cc..bd3da88428a9 100644 --- a/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/task.proto +++ b/java-tasks/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2023 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"; @@ -118,8 +117,8 @@ message Task { // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the // task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. // - // Note that when the request is cancelled, Cloud Tasks will stop listing for - // the response, but whether the worker stops processing depends on the + // Note that when the request is cancelled, Cloud Tasks will stop listening + // for the response, but whether the worker stops processing depends on the // worker. For example, if the worker is stuck, it may not react to cancelled // requests. // diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequest.java new file mode 100644 index 000000000000..070c70e3a06f --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequest.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * LINT.IfChange
+ * Request message for
+ * [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.BufferTaskRequest} + */ +public final class BufferTaskRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.BufferTaskRequest) + BufferTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BufferTaskRequest.newBuilder() to construct. + private BufferTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BufferTaskRequest() { + queue_ = ""; + taskId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BufferTaskRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.BufferTaskRequest.class, + com.google.cloud.tasks.v2beta2.BufferTaskRequest.Builder.class); + } + + public static final int QUEUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object queue_ = ""; + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + @java.lang.Override + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + 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(); + queue_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object taskId_ = ""; + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + @java.lang.Override + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + 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(); + taskId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BODY_FIELD_NUMBER = 3; + private com.google.api.HttpBody body_; + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + @java.lang.Override + public boolean hasBody() { + return body_ != null; + } + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + @java.lang.Override + public com.google.api.HttpBody getBody() { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.api.HttpBodyOrBuilder getBodyOrBuilder() { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, taskId_); + } + if (body_ != null) { + output.writeMessage(3, getBody()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, taskId_); + } + if (body_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBody()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.BufferTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.BufferTaskRequest other = + (com.google.cloud.tasks.v2beta2.BufferTaskRequest) obj; + + if (!getQueue().equals(other.getQueue())) return false; + if (!getTaskId().equals(other.getTaskId())) return false; + if (hasBody() != other.hasBody()) return false; + if (hasBody()) { + if (!getBody().equals(other.getBody())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.BufferTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * LINT.IfChange
+   * Request message for
+   * [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.BufferTaskRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.BufferTaskRequest) + com.google.cloud.tasks.v2beta2.BufferTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.BufferTaskRequest.class, + com.google.cloud.tasks.v2beta2.BufferTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.BufferTaskRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queue_ = ""; + taskId_ = ""; + body_ = null; + if (bodyBuilder_ != null) { + bodyBuilder_.dispose(); + bodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.BufferTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskRequest build() { + com.google.cloud.tasks.v2beta2.BufferTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.BufferTaskRequest result = + new com.google.cloud.tasks.v2beta2.BufferTaskRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.BufferTaskRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queue_ = queue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.body_ = bodyBuilder_ == null ? body_ : bodyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.BufferTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.BufferTaskRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.BufferTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.BufferTaskRequest.getDefaultInstance()) + return this; + if (!other.getQueue().isEmpty()) { + queue_ = other.queue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBody()) { + mergeBody(other.getBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getBodyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object queue_ = ""; + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The queue to set. + * @return This builder for chaining. + */ + public Builder setQueue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearQueue() { + queue_ = getDefaultInstance().getQueue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for queue to set. + * @return This builder for chaining. + */ + public Builder setQueueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object taskId_ = ""; + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + taskId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.api.HttpBody body_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + bodyBuilder_; + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + public boolean hasBody() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + public com.google.api.HttpBody getBody() { + if (bodyBuilder_ == null) { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } else { + return bodyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBody(com.google.api.HttpBody value) { + if (bodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + } else { + bodyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBody(com.google.api.HttpBody.Builder builderForValue) { + if (bodyBuilder_ == null) { + body_ = builderForValue.build(); + } else { + bodyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeBody(com.google.api.HttpBody value) { + if (bodyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && body_ != null + && body_ != com.google.api.HttpBody.getDefaultInstance()) { + getBodyBuilder().mergeFrom(value); + } else { + body_ = value; + } + } else { + bodyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000004); + body_ = null; + if (bodyBuilder_ != null) { + bodyBuilder_.dispose(); + bodyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBody.Builder getBodyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBodyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBodyOrBuilder getBodyOrBuilder() { + if (bodyBuilder_ != null) { + return bodyBuilder_.getMessageOrBuilder(); + } else { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + getBodyFieldBuilder() { + if (bodyBuilder_ == null) { + bodyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder>(getBody(), getParentForChildren(), isClean()); + body_ = null; + } + return bodyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.BufferTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.BufferTaskRequest) + private static final com.google.cloud.tasks.v2beta2.BufferTaskRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.BufferTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BufferTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequestOrBuilder.java new file mode 100644 index 000000000000..8a7f5b865e19 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface BufferTaskRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.BufferTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + java.lang.String getQueue(); + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + com.google.protobuf.ByteString getQueueBytes(); + + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + java.lang.String getTaskId(); + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + com.google.protobuf.ByteString getTaskIdBytes(); + + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + boolean hasBody(); + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + com.google.api.HttpBody getBody(); + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.api.HttpBodyOrBuilder getBodyOrBuilder(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponse.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponse.java new file mode 100644 index 000000000000..ab731f08247a --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponse.java @@ -0,0 +1,699 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Response message for
+ * [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.BufferTaskResponse} + */ +public final class BufferTaskResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.BufferTaskResponse) + BufferTaskResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BufferTaskResponse.newBuilder() to construct. + private BufferTaskResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BufferTaskResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BufferTaskResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.BufferTaskResponse.class, + com.google.cloud.tasks.v2beta2.BufferTaskResponse.Builder.class); + } + + public static final int TASK_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta2.Task task_; + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return Whether the task field is set. + */ + @java.lang.Override + public boolean hasTask() { + return task_ != null; + } + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return The task. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.Task getTask() { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder() { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (task_ != null) { + output.writeMessage(1, getTask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (task_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.BufferTaskResponse)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.BufferTaskResponse other = + (com.google.cloud.tasks.v2beta2.BufferTaskResponse) obj; + + if (hasTask() != other.hasTask()) return false; + if (hasTask()) { + if (!getTask().equals(other.getTask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTask()) { + hash = (37 * hash) + TASK_FIELD_NUMBER; + hash = (53 * hash) + getTask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.BufferTaskResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.BufferTaskResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.BufferTaskResponse) + com.google.cloud.tasks.v2beta2.BufferTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.BufferTaskResponse.class, + com.google.cloud.tasks.v2beta2.BufferTaskResponse.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.BufferTaskResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskResponse getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.BufferTaskResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskResponse build() { + com.google.cloud.tasks.v2beta2.BufferTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskResponse buildPartial() { + com.google.cloud.tasks.v2beta2.BufferTaskResponse result = + new com.google.cloud.tasks.v2beta2.BufferTaskResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.BufferTaskResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.task_ = taskBuilder_ == null ? task_ : taskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.BufferTaskResponse) { + return mergeFrom((com.google.cloud.tasks.v2beta2.BufferTaskResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.BufferTaskResponse other) { + if (other == com.google.cloud.tasks.v2beta2.BufferTaskResponse.getDefaultInstance()) + return this; + if (other.hasTask()) { + mergeTask(other.getTask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta2.Task task_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, + com.google.cloud.tasks.v2beta2.Task.Builder, + com.google.cloud.tasks.v2beta2.TaskOrBuilder> + taskBuilder_; + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return Whether the task field is set. + */ + public boolean hasTask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return The task. + */ + public com.google.cloud.tasks.v2beta2.Task getTask() { + if (taskBuilder_ == null) { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } else { + return taskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public Builder setTask(com.google.cloud.tasks.v2beta2.Task value) { + if (taskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + } else { + taskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public Builder setTask(com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (taskBuilder_ == null) { + task_ = builderForValue.build(); + } else { + taskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public Builder mergeTask(com.google.cloud.tasks.v2beta2.Task value) { + if (taskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && task_ != null + && task_ != com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()) { + getTaskBuilder().mergeFrom(value); + } else { + task_ = value; + } + } else { + taskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public Builder clearTask() { + bitField0_ = (bitField0_ & ~0x00000001); + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder getTaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder() { + if (taskBuilder_ != null) { + return taskBuilder_.getMessageOrBuilder(); + } else { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, + com.google.cloud.tasks.v2beta2.Task.Builder, + com.google.cloud.tasks.v2beta2.TaskOrBuilder> + getTaskFieldBuilder() { + if (taskBuilder_ == null) { + taskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, + com.google.cloud.tasks.v2beta2.Task.Builder, + com.google.cloud.tasks.v2beta2.TaskOrBuilder>( + getTask(), getParentForChildren(), isClean()); + task_ = null; + } + return taskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.BufferTaskResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.BufferTaskResponse) + private static final com.google.cloud.tasks.v2beta2.BufferTaskResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.BufferTaskResponse(); + } + + public static com.google.cloud.tasks.v2beta2.BufferTaskResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BufferTaskResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.BufferTaskResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponseOrBuilder.java new file mode 100644 index 000000000000..3b5dc1829f9e --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/BufferTaskResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface BufferTaskResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.BufferTaskResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return Whether the task field is set. + */ + boolean hasTask(); + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + * + * @return The task. + */ + com.google.cloud.tasks.v2beta2.Task getTask(); + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 1; + */ + com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java index 7e39e6e8e9e7..ed6c17b05fcf 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java @@ -63,6 +63,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -107,6 +111,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -120,177 +132,195 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\032google.cloud.tasks.v2beta2\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032&google/clo" - + "ud/tasks/v2beta2/queue.proto\032%google/clo" - + "ud/tasks/v2beta2/task.proto\032\036google/iam/" - + "v1/iam_policy.proto\032\032google/iam/v1/polic" - + "y.proto\032\036google/protobuf/duration.proto\032" - + "\033google/protobuf/empty.proto\032 google/pro" - + "tobuf/field_mask.proto\032\037google/protobuf/" - + "timestamp.proto\"\271\001\n\021ListQueuesRequest\0228\n" - + "\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037cloudtasks.googl" - + "eapis.com/Queue\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\0223\n\tread_m" - + "ask\030\005 \001(\0132\032.google.protobuf.FieldMaskB\004\342" - + "A\001\001\"`\n\022ListQueuesResponse\0221\n\006queues\030\001 \003(" - + "\0132!.google.cloud.tasks.v2beta2.Queue\022\027\n\017" - + "next_page_token\030\002 \001(\t\"~\n\017GetQueueRequest" - + "\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.goog" - + "leapis.com/Queue\0223\n\tread_mask\030\002 \001(\0132\032.go" - + "ogle.protobuf.FieldMaskB\004\342A\001\001\"\206\001\n\022Create" - + "QueueRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037c" - + "loudtasks.googleapis.com/Queue\0226\n\005queue\030" - + "\002 \001(\0132!.google.cloud.tasks.v2beta2.Queue" - + "B\004\342A\001\002\"}\n\022UpdateQueueRequest\0226\n\005queue\030\001 " - + "\001(\0132!.google.cloud.tasks.v2beta2.QueueB\004" - + "\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.proto" - + "buf.FieldMask\"L\n\022DeleteQueueRequest\0226\n\004n" - + "ame\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapi" - + "s.com/Queue\"K\n\021PurgeQueueRequest\0226\n\004name" - + "\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis.c" - + "om/Queue\"K\n\021PauseQueueRequest\0226\n\004name\030\001 " - + "\001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis.com/" - + "Queue\"L\n\022ResumeQueueRequest\0226\n\004name\030\001 \001(" + + "o\032\031google/api/httpbody.proto\032\031google/api" + + "/resource.proto\032&google/cloud/tasks/v2be" + + "ta2/queue.proto\032%google/cloud/tasks/v2be" + + "ta2/task.proto\032\036google/iam/v1/iam_policy" + + ".proto\032\032google/iam/v1/policy.proto\032\036goog" + + "le/protobuf/duration.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\032\037google/protobuf/timestamp.pro" + + "to\"\271\001\n\021ListQueuesRequest\0228\n\006parent\030\001 \001(\t" + + "B(\342A\001\002\372A!\022\037cloudtasks.googleapis.com/Que" + + "ue\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\0223\n\tread_mask\030\005 \001(\0132\032.g" + + "oogle.protobuf.FieldMaskB\004\342A\001\001\"`\n\022ListQu" + + "euesResponse\0221\n\006queues\030\001 \003(\0132!.google.cl" + + "oud.tasks.v2beta2.Queue\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"~\n\017GetQueueRequest\0226\n\004name\030\001 \001(" + "\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis.com/Qu" - + "eue\"\260\001\n\020ListTasksRequest\0227\n\006parent\030\001 \001(\t" - + "B\'\342A\001\002\372A \022\036cloudtasks.googleapis.com/Tas" - + "k\022<\n\rresponse_view\030\002 \001(\0162%.google.cloud." - + "tasks.v2beta2.Task.View\022\021\n\tpage_size\030\004 \001" - + "(\005\022\022\n\npage_token\030\005 \001(\t\"]\n\021ListTasksRespo" - + "nse\022/\n\005tasks\030\001 \003(\0132 .google.cloud.tasks." - + "v2beta2.Task\022\027\n\017next_page_token\030\002 \001(\t\"\205\001" - + "\n\016GetTaskRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n" - + "\036cloudtasks.googleapis.com/Task\022<\n\rrespo" - + "nse_view\030\002 \001(\0162%.google.cloud.tasks.v2be" - + "ta2.Task.View\"\300\001\n\021CreateTaskRequest\0227\n\006p" - + "arent\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.googlea" - + "pis.com/Task\0224\n\004task\030\002 \001(\0132 .google.clou" - + "d.tasks.v2beta2.TaskB\004\342A\001\002\022<\n\rresponse_v" - + "iew\030\003 \001(\0162%.google.cloud.tasks.v2beta2.T" - + "ask.View\"J\n\021DeleteTaskRequest\0225\n\004name\030\001 " - + "\001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleapis.com/" - + "Task\"\346\001\n\021LeaseTasksRequest\0227\n\006parent\030\001 \001" - + "(\tB\'\342A\001\002\372A \022\036cloudtasks.googleapis.com/T" - + "ask\022\021\n\tmax_tasks\030\002 \001(\005\0227\n\016lease_duration" - + "\030\003 \001(\0132\031.google.protobuf.DurationB\004\342A\001\002\022" - + "<\n\rresponse_view\030\004 \001(\0162%.google.cloud.ta" - + "sks.v2beta2.Task.View\022\016\n\006filter\030\005 \001(\t\"E\n" - + "\022LeaseTasksResponse\022/\n\005tasks\030\001 \003(\0132 .goo" - + "gle.cloud.tasks.v2beta2.Task\"\210\001\n\026Acknowl" - + "edgeTaskRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036" - + "cloudtasks.googleapis.com/Task\0227\n\rschedu" - + "le_time\030\002 \001(\0132\032.google.protobuf.Timestam" - + "pB\004\342A\001\002\"\372\001\n\021RenewLeaseRequest\0225\n\004name\030\001 " - + "\001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleapis.com/" - + "Task\0227\n\rschedule_time\030\002 \001(\0132\032.google.pro" - + "tobuf.TimestampB\004\342A\001\002\0227\n\016lease_duration\030" - + "\003 \001(\0132\031.google.protobuf.DurationB\004\342A\001\002\022<" - + "\n\rresponse_view\030\004 \001(\0162%.google.cloud.tas" - + "ks.v2beta2.Task.View\"\302\001\n\022CancelLeaseRequ" - + "est\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks.g" - + "oogleapis.com/Task\0227\n\rschedule_time\030\002 \001(" - + "\0132\032.google.protobuf.TimestampB\004\342A\001\002\022<\n\rr" - + "esponse_view\030\003 \001(\0162%.google.cloud.tasks." - + "v2beta2.Task.View\"\205\001\n\016RunTaskRequest\0225\n\004" - + "name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleap" - + "is.com/Task\022<\n\rresponse_view\030\002 \001(\0162%.goo" - + "gle.cloud.tasks.v2beta2.Task.View2\324\034\n\nCl" - + "oudTasks\022\255\001\n\nListQueues\022-.google.cloud.t" - + "asks.v2beta2.ListQueuesRequest\032..google." - + "cloud.tasks.v2beta2.ListQueuesResponse\"@" - + "\332A\006parent\202\323\344\223\0021\022//v2beta2/{parent=projec" - + "ts/*/locations/*}/queues\022\232\001\n\010GetQueue\022+." - + "google.cloud.tasks.v2beta2.GetQueueReque" - + "st\032!.google.cloud.tasks.v2beta2.Queue\">\332" - + "A\004name\202\323\344\223\0021\022//v2beta2/{name=projects/*/" - + "locations/*/queues/*}\022\257\001\n\013CreateQueue\022.." - + "google.cloud.tasks.v2beta2.CreateQueueRe" - + "quest\032!.google.cloud.tasks.v2beta2.Queue" - + "\"M\332A\014parent,queue\202\323\344\223\0028\"//v2beta2/{paren" - + "t=projects/*/locations/*}/queues:\005queue\022" - + "\272\001\n\013UpdateQueue\022..google.cloud.tasks.v2b" - + "eta2.UpdateQueueRequest\032!.google.cloud.t" - + "asks.v2beta2.Queue\"X\332A\021queue,update_mask" - + "\202\323\344\223\002>25/v2beta2/{queue.name=projects/*/" - + "locations/*/queues/*}:\005queue\022\225\001\n\013DeleteQ" - + "ueue\022..google.cloud.tasks.v2beta2.Delete" - + "QueueRequest\032\026.google.protobuf.Empty\">\332A" - + "\004name\202\323\344\223\0021*//v2beta2/{name=projects/*/l" - + "ocations/*/queues/*}\022\247\001\n\nPurgeQueue\022-.go" - + "ogle.cloud.tasks.v2beta2.PurgeQueueReque" - + "st\032!.google.cloud.tasks.v2beta2.Queue\"G\332" - + "A\004name\202\323\344\223\002:\"5/v2beta2/{name=projects/*/" - + "locations/*/queues/*}:purge:\001*\022\247\001\n\nPause" - + "Queue\022-.google.cloud.tasks.v2beta2.Pause" + + "eue\0223\n\tread_mask\030\002 \001(\0132\032.google.protobuf" + + ".FieldMaskB\004\342A\001\001\"\206\001\n\022CreateQueueRequest\022" + + "8\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037cloudtasks.goo" + + "gleapis.com/Queue\0226\n\005queue\030\002 \001(\0132!.googl" + + "e.cloud.tasks.v2beta2.QueueB\004\342A\001\002\"}\n\022Upd" + + "ateQueueRequest\0226\n\005queue\030\001 \001(\0132!.google." + + "cloud.tasks.v2beta2.QueueB\004\342A\001\002\022/\n\013updat" + + "e_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" + + "\"L\n\022DeleteQueueRequest\0226\n\004name\030\001 \001(\tB(\342A" + + "\001\002\372A!\n\037cloudtasks.googleapis.com/Queue\"K" + + "\n\021PurgeQueueRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372" + + "A!\n\037cloudtasks.googleapis.com/Queue\"K\n\021P" + + "auseQueueRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n" + + "\037cloudtasks.googleapis.com/Queue\"L\n\022Resu" + + "meQueueRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037c" + + "loudtasks.googleapis.com/Queue\"j\n\026Upload" + + "QueueYamlRequest\022\024\n\006app_id\030\001 \001(\tB\004\342A\001\002\022," + + "\n\thttp_body\030\002 \001(\0132\024.google.api.HttpBodyH" + + "\000\210\001\001B\014\n\n_http_body\"\260\001\n\020ListTasksRequest\022" + + "7\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.goo" + + "gleapis.com/Task\022<\n\rresponse_view\030\002 \001(\0162" + + "%.google.cloud.tasks.v2beta2.Task.View\022\021" + + "\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"]\n" + + "\021ListTasksResponse\022/\n\005tasks\030\001 \003(\0132 .goog" + + "le.cloud.tasks.v2beta2.Task\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\205\001\n\016GetTaskRequest\0225\n\004name\030" + + "\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleapis.co" + + "m/Task\022<\n\rresponse_view\030\002 \001(\0162%.google.c" + + "loud.tasks.v2beta2.Task.View\"\300\001\n\021CreateT" + + "askRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036clo" + + "udtasks.googleapis.com/Task\0224\n\004task\030\002 \001(" + + "\0132 .google.cloud.tasks.v2beta2.TaskB\004\342A\001" + + "\002\022<\n\rresponse_view\030\003 \001(\0162%.google.cloud." + + "tasks.v2beta2.Task.View\"J\n\021DeleteTaskReq" + + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks." + + "googleapis.com/Task\"\346\001\n\021LeaseTasksReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.g" + + "oogleapis.com/Task\022\021\n\tmax_tasks\030\002 \001(\005\0227\n" + + "\016lease_duration\030\003 \001(\0132\031.google.protobuf." + + "DurationB\004\342A\001\002\022<\n\rresponse_view\030\004 \001(\0162%." + + "google.cloud.tasks.v2beta2.Task.View\022\016\n\006" + + "filter\030\005 \001(\t\"E\n\022LeaseTasksResponse\022/\n\005ta" + + "sks\030\001 \003(\0132 .google.cloud.tasks.v2beta2.T" + + "ask\"\210\001\n\026AcknowledgeTaskRequest\0225\n\004name\030\001" + + " \001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleapis.com" + + "/Task\0227\n\rschedule_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\004\342A\001\002\"\372\001\n\021RenewLeaseReq" + + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks." + + "googleapis.com/Task\0227\n\rschedule_time\030\002 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\002\0227\n\016" + + "lease_duration\030\003 \001(\0132\031.google.protobuf.D" + + "urationB\004\342A\001\002\022<\n\rresponse_view\030\004 \001(\0162%.g" + + "oogle.cloud.tasks.v2beta2.Task.View\"\302\001\n\022" + + "CancelLeaseRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A" + + " \n\036cloudtasks.googleapis.com/Task\0227\n\rsch" + + "edule_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\002\022<\n\rresponse_view\030\003 \001(\0162%.goog" + + "le.cloud.tasks.v2beta2.Task.View\"\205\001\n\016Run" + + "TaskRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036clou" + + "dtasks.googleapis.com/Task\022<\n\rresponse_v" + + "iew\030\002 \001(\0162%.google.cloud.tasks.v2beta2.T" + + "ask.View\"\214\001\n\021BufferTaskRequest\0226\n\005queue\030" + + "\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.googleapis.co" + + "m/Task\022\025\n\007task_id\030\002 \001(\tB\004\342A\001\001\022(\n\004body\030\003 " + + "\001(\0132\024.google.api.HttpBodyB\004\342A\001\001\"D\n\022Buffe" + + "rTaskResponse\022.\n\004task\030\001 \001(\0132 .google.clo" + + "ud.tasks.v2beta2.Task2\214\037\n\nCloudTasks\022\255\001\n" + + "\nListQueues\022-.google.cloud.tasks.v2beta2" + + ".ListQueuesRequest\032..google.cloud.tasks." + + "v2beta2.ListQueuesResponse\"@\332A\006parent\202\323\344" + + "\223\0021\022//v2beta2/{parent=projects/*/locatio" + + "ns/*}/queues\022\232\001\n\010GetQueue\022+.google.cloud" + + ".tasks.v2beta2.GetQueueRequest\032!.google." + + "cloud.tasks.v2beta2.Queue\">\332A\004name\202\323\344\223\0021" + + "\022//v2beta2/{name=projects/*/locations/*/" + + "queues/*}\022\257\001\n\013CreateQueue\022..google.cloud" + + ".tasks.v2beta2.CreateQueueRequest\032!.goog" + + "le.cloud.tasks.v2beta2.Queue\"M\332A\014parent," + + "queue\202\323\344\223\0028\"//v2beta2/{parent=projects/*" + + "/locations/*}/queues:\005queue\022\272\001\n\013UpdateQu" + + "eue\022..google.cloud.tasks.v2beta2.UpdateQ" + + "ueueRequest\032!.google.cloud.tasks.v2beta2" + + ".Queue\"X\332A\021queue,update_mask\202\323\344\223\002>25/v2b" + + "eta2/{queue.name=projects/*/locations/*/" + + "queues/*}:\005queue\022\225\001\n\013DeleteQueue\022..googl" + + "e.cloud.tasks.v2beta2.DeleteQueueRequest" + + "\032\026.google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*" + + "//v2beta2/{name=projects/*/locations/*/q" + + "ueues/*}\022\247\001\n\nPurgeQueue\022-.google.cloud.t" + + "asks.v2beta2.PurgeQueueRequest\032!.google." + + "cloud.tasks.v2beta2.Queue\"G\332A\004name\202\323\344\223\002:" + + "\"5/v2beta2/{name=projects/*/locations/*/" + + "queues/*}:purge:\001*\022\247\001\n\nPauseQueue\022-.goog" + + "le.cloud.tasks.v2beta2.PauseQueueRequest" + + "\032!.google.cloud.tasks.v2beta2.Queue\"G\332A\004" + + "name\202\323\344\223\002:\"5/v2beta2/{name=projects/*/lo" + + "cations/*/queues/*}:pause:\001*\022\252\001\n\013ResumeQ" + + "ueue\022..google.cloud.tasks.v2beta2.Resume" + "QueueRequest\032!.google.cloud.tasks.v2beta" - + "2.Queue\"G\332A\004name\202\323\344\223\002:\"5/v2beta2/{name=p" - + "rojects/*/locations/*/queues/*}:pause:\001*" - + "\022\252\001\n\013ResumeQueue\022..google.cloud.tasks.v2" - + "beta2.ResumeQueueRequest\032!.google.cloud." - + "tasks.v2beta2.Queue\"H\332A\004name\202\323\344\223\002;\"6/v2b" - + "eta2/{name=projects/*/locations/*/queues" - + "/*}:resume:\001*\022\241\001\n\014GetIamPolicy\022\".google." - + "iam.v1.GetIamPolicyRequest\032\025.google.iam." - + "v1.Policy\"V\332A\010resource\202\323\344\223\002E\"@/v2beta2/{" - + "resource=projects/*/locations/*/queues/*" - + "}:getIamPolicy:\001*\022\250\001\n\014SetIamPolicy\022\".goo" - + "gle.iam.v1.SetIamPolicyRequest\032\025.google." - + "iam.v1.Policy\"]\332A\017resource,policy\202\323\344\223\002E\"" - + "@/v2beta2/{resource=projects/*/locations" - + "/*/queues/*}:setIamPolicy:\001*\022\323\001\n\022TestIam" - + "Permissions\022(.google.iam.v1.TestIamPermi" - + "ssionsRequest\032).google.iam.v1.TestIamPer" - + "missionsResponse\"h\332A\024resource,permission" - + "s\202\323\344\223\002K\"F/v2beta2/{resource=projects/*/l" - + "ocations/*/queues/*}:testIamPermissions:" - + "\001*\022\262\001\n\tListTasks\022,.google.cloud.tasks.v2" - + "beta2.ListTasksRequest\032-.google.cloud.ta" - + "sks.v2beta2.ListTasksResponse\"H\332A\006parent" - + "\202\323\344\223\0029\0227/v2beta2/{parent=projects/*/loca" - + "tions/*/queues/*}/tasks\022\237\001\n\007GetTask\022*.go" - + "ogle.cloud.tasks.v2beta2.GetTaskRequest\032" - + " .google.cloud.tasks.v2beta2.Task\"F\332A\004na" - + "me\202\323\344\223\0029\0227/v2beta2/{name=projects/*/loca" - + "tions/*/queues/*/tasks/*}\022\257\001\n\nCreateTask" - + "\022-.google.cloud.tasks.v2beta2.CreateTask" - + "Request\032 .google.cloud.tasks.v2beta2.Tas" - + "k\"P\332A\013parent,task\202\323\344\223\002<\"7/v2beta2/{paren" - + "t=projects/*/locations/*/queues/*}/tasks" - + ":\001*\022\233\001\n\nDeleteTask\022-.google.cloud.tasks." - + "v2beta2.DeleteTaskRequest\032\026.google.proto" - + "buf.Empty\"F\332A\004name\202\323\344\223\0029*7/v2beta2/{name" - + "=projects/*/locations/*/queues/*/tasks/*" - + "}\022\315\001\n\nLeaseTasks\022-.google.cloud.tasks.v2" - + "beta2.LeaseTasksRequest\032..google.cloud.t" - + "asks.v2beta2.LeaseTasksResponse\"`\332A\025pare" - + "nt,lease_duration\202\323\344\223\002B\"=/v2beta2/{paren" - + "t=projects/*/locations/*/queues/*}/tasks" - + ":lease:\001*\022\302\001\n\017AcknowledgeTask\0222.google.c" - + "loud.tasks.v2beta2.AcknowledgeTaskReques" - + "t\032\026.google.protobuf.Empty\"c\332A\022name,sched" - + "ule_time\202\323\344\223\002H\"C/v2beta2/{name=projects/" - + "*/locations/*/queues/*/tasks/*}:acknowle" - + "dge:\001*\022\320\001\n\nRenewLease\022-.google.cloud.tas" - + "ks.v2beta2.RenewLeaseRequest\032 .google.cl" - + "oud.tasks.v2beta2.Task\"q\332A!name,schedule" - + "_time,lease_duration\202\323\344\223\002G\"B/v2beta2/{na" - + "me=projects/*/locations/*/queues/*/tasks" - + "/*}:renewLease:\001*\022\304\001\n\013CancelLease\022..goog" - + "le.cloud.tasks.v2beta2.CancelLeaseReques" - + "t\032 .google.cloud.tasks.v2beta2.Task\"c\332A\022" - + "name,schedule_time\202\323\344\223\002H\"C/v2beta2/{name" - + "=projects/*/locations/*/queues/*/tasks/*" - + "}:cancelLease:\001*\022\246\001\n\007RunTask\022*.google.cl" - + "oud.tasks.v2beta2.RunTaskRequest\032 .googl" - + "e.cloud.tasks.v2beta2.Task\"M\332A\004name\202\323\344\223\002" - + "@\";/v2beta2/{name=projects/*/locations/*" - + "/queues/*/tasks/*}:run:\001*\032M\312A\031cloudtasks" - + ".googleapis.com\322A.https://www.googleapis" - + ".com/auth/cloud-platformB\200\001\n\036com.google." - + "cloud.tasks.v2beta2B\017CloudTasksProtoP\001ZC" - + "cloud.google.com/go/cloudtasks/apiv2beta" - + "2/cloudtaskspb;cloudtaskspb\242\002\005TASKSb\006pro" - + "to3" + + "2.Queue\"H\332A\004name\202\323\344\223\002;\"6/v2beta2/{name=p" + + "rojects/*/locations/*/queues/*}:resume:\001" + + "*\022_\n\017UploadQueueYaml\0222.google.cloud.task" + + "s.v2beta2.UploadQueueYamlRequest\032\026.googl" + + "e.protobuf.Empty\"\000\022\241\001\n\014GetIamPolicy\022\".go" + + "ogle.iam.v1.GetIamPolicyRequest\032\025.google" + + ".iam.v1.Policy\"V\332A\010resource\202\323\344\223\002E\"@/v2be" + + "ta2/{resource=projects/*/locations/*/que" + + "ues/*}:getIamPolicy:\001*\022\250\001\n\014SetIamPolicy\022" + + "\".google.iam.v1.SetIamPolicyRequest\032\025.go" + + "ogle.iam.v1.Policy\"]\332A\017resource,policy\202\323" + + "\344\223\002E\"@/v2beta2/{resource=projects/*/loca" + + "tions/*/queues/*}:setIamPolicy:\001*\022\323\001\n\022Te" + + "stIamPermissions\022(.google.iam.v1.TestIam" + + "PermissionsRequest\032).google.iam.v1.TestI" + + "amPermissionsResponse\"h\332A\024resource,permi" + + "ssions\202\323\344\223\002K\"F/v2beta2/{resource=project" + + "s/*/locations/*/queues/*}:testIamPermiss" + + "ions:\001*\022\262\001\n\tListTasks\022,.google.cloud.tas" + + "ks.v2beta2.ListTasksRequest\032-.google.clo" + + "ud.tasks.v2beta2.ListTasksResponse\"H\332A\006p" + + "arent\202\323\344\223\0029\0227/v2beta2/{parent=projects/*" + + "/locations/*/queues/*}/tasks\022\237\001\n\007GetTask" + + "\022*.google.cloud.tasks.v2beta2.GetTaskReq" + + "uest\032 .google.cloud.tasks.v2beta2.Task\"F" + + "\332A\004name\202\323\344\223\0029\0227/v2beta2/{name=projects/*" + + "/locations/*/queues/*/tasks/*}\022\257\001\n\nCreat" + + "eTask\022-.google.cloud.tasks.v2beta2.Creat" + + "eTaskRequest\032 .google.cloud.tasks.v2beta" + + "2.Task\"P\332A\013parent,task\202\323\344\223\002<\"7/v2beta2/{" + + "parent=projects/*/locations/*/queues/*}/" + + "tasks:\001*\022\233\001\n\nDeleteTask\022-.google.cloud.t" + + "asks.v2beta2.DeleteTaskRequest\032\026.google." + + "protobuf.Empty\"F\332A\004name\202\323\344\223\0029*7/v2beta2/" + + "{name=projects/*/locations/*/queues/*/ta" + + "sks/*}\022\315\001\n\nLeaseTasks\022-.google.cloud.tas" + + "ks.v2beta2.LeaseTasksRequest\032..google.cl" + + "oud.tasks.v2beta2.LeaseTasksResponse\"`\332A" + + "\025parent,lease_duration\202\323\344\223\002B\"=/v2beta2/{" + + "parent=projects/*/locations/*/queues/*}/" + + "tasks:lease:\001*\022\302\001\n\017AcknowledgeTask\0222.goo" + + "gle.cloud.tasks.v2beta2.AcknowledgeTaskR" + + "equest\032\026.google.protobuf.Empty\"c\332A\022name," + + "schedule_time\202\323\344\223\002H\"C/v2beta2/{name=proj" + + "ects/*/locations/*/queues/*/tasks/*}:ack" + + "nowledge:\001*\022\320\001\n\nRenewLease\022-.google.clou" + + "d.tasks.v2beta2.RenewLeaseRequest\032 .goog" + + "le.cloud.tasks.v2beta2.Task\"q\332A!name,sch" + + "edule_time,lease_duration\202\323\344\223\002G\"B/v2beta" + + "2/{name=projects/*/locations/*/queues/*/" + + "tasks/*}:renewLease:\001*\022\304\001\n\013CancelLease\022." + + ".google.cloud.tasks.v2beta2.CancelLeaseR" + + "equest\032 .google.cloud.tasks.v2beta2.Task" + + "\"c\332A\022name,schedule_time\202\323\344\223\002H\"C/v2beta2/" + + "{name=projects/*/locations/*/queues/*/ta" + + "sks/*}:cancelLease:\001*\022\246\001\n\007RunTask\022*.goog" + + "le.cloud.tasks.v2beta2.RunTaskRequest\032 ." + + "google.cloud.tasks.v2beta2.Task\"M\332A\004name" + + "\202\323\344\223\002@\";/v2beta2/{name=projects/*/locati" + + "ons/*/queues/*/tasks/*}:run:\001*\022\324\001\n\nBuffe" + + "rTask\022-.google.cloud.tasks.v2beta2.Buffe" + + "rTaskRequest\032..google.cloud.tasks.v2beta" + + "2.BufferTaskResponse\"g\332A\022queue,task_id,b" + + "ody\202\323\344\223\002L\"G/v2beta2/{queue=projects/*/lo" + + "cations/*/queues/*}/tasks/{task_id}:buff" + + "er:\001*\032M\312A\031cloudtasks.googleapis.com\322A.ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "formB\320\001\n\036com.google.cloud.tasks.v2beta2B" + + "\017CloudTasksProtoP\001ZCcloud.google.com/go/" + + "cloudtasks/apiv2beta2/cloudtaskspb;cloud" + + "taskspb\242\002\005TASKS\352AM\n\"cloudtasks.googleapi" + + "s.com/Location\022\'projects/{project}/locat" + + "ions/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -299,6 +329,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.HttpBodyProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.tasks.v2beta2.QueueProto.getDescriptor(), com.google.cloud.tasks.v2beta2.TaskProto.getDescriptor(), @@ -381,8 +412,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor = + internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor, + new java.lang.String[] { + "AppId", "HttpBody", "HttpBody", + }); + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor = + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor, @@ -390,7 +429,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ResponseView", "PageSize", "PageToken", }); internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor, @@ -398,7 +437,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tasks", "NextPageToken", }); internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor, @@ -406,7 +445,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ResponseView", }); internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor, @@ -414,7 +453,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Task", "ResponseView", }); internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor, @@ -422,7 +461,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor, @@ -430,7 +469,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "MaxTasks", "LeaseDuration", "ResponseView", "Filter", }); internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor, @@ -438,7 +477,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Tasks", }); internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor, @@ -446,7 +485,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ScheduleTime", }); internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor, @@ -454,7 +493,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ScheduleTime", "LeaseDuration", "ResponseView", }); internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor, @@ -462,13 +501,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ScheduleTime", "ResponseView", }); internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor, new java.lang.String[] { "Name", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_BufferTaskRequest_descriptor, + new java.lang.String[] { + "Queue", "TaskId", "Body", + }); + internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_BufferTaskResponse_descriptor, + new java.lang.String[] { + "Task", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -476,12 +531,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.AnnotationsProto.http); registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.HttpBodyProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.tasks.v2beta2.QueueProto.getDescriptor(); com.google.cloud.tasks.v2beta2.TaskProto.getDescriptor(); diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java index 52238004a758..f5a53c56cb1f 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java @@ -150,10 +150,10 @@ public com.google.protobuf.ByteString getParentBytes() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -198,10 +198,10 @@ public boolean hasTask() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -246,10 +246,10 @@ public com.google.cloud.tasks.v2beta2.Task getTask() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -885,10 +885,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -932,10 +932,10 @@ public boolean hasTask() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -983,10 +983,10 @@ public com.google.cloud.tasks.v2beta2.Task getTask() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1038,10 +1038,10 @@ public Builder setTask(com.google.cloud.tasks.v2beta2.Task value) { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1090,10 +1090,10 @@ public Builder setTask(com.google.cloud.tasks.v2beta2.Task.Builder builderForVal * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1148,10 +1148,10 @@ public Builder mergeTask(com.google.cloud.tasks.v2beta2.Task value) { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1200,10 +1200,10 @@ public Builder clearTask() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1247,10 +1247,10 @@ public com.google.cloud.tasks.v2beta2.Task.Builder getTaskBuilder() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -1296,10 +1296,10 @@ public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder() { * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java index c6db6d0e81d1..3367119f8fae 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java @@ -81,10 +81,10 @@ public interface CreateTaskRequestOrBuilder * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -126,10 +126,10 @@ public interface CreateTaskRequestOrBuilder * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -171,10 +171,10 @@ public interface CreateTaskRequestOrBuilder * that was deleted or completed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or completed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. + * for ~9 days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java index e66867ffd975..d3b4b8a95fa1 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java @@ -88,6 +88,26 @@ public enum HttpMethod implements com.google.protobuf.ProtocolMessageEnum { * DELETE = 5; */ DELETE(5), + /** + * + * + *
+   * HTTP PATCH
+   * 
+ * + * PATCH = 6; + */ + PATCH(6), + /** + * + * + *
+   * HTTP OPTIONS
+   * 
+ * + * OPTIONS = 7; + */ + OPTIONS(7), UNRECOGNIZED(-1), ; @@ -151,6 +171,26 @@ public enum HttpMethod implements com.google.protobuf.ProtocolMessageEnum { * DELETE = 5; */ public static final int DELETE_VALUE = 5; + /** + * + * + *
+   * HTTP PATCH
+   * 
+ * + * PATCH = 6; + */ + public static final int PATCH_VALUE = 6; + /** + * + * + *
+   * HTTP OPTIONS
+   * 
+ * + * OPTIONS = 7; + */ + public static final int OPTIONS_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -188,6 +228,10 @@ public static HttpMethod forNumber(int value) { return PUT; case 5: return DELETE; + case 6: + return PATCH; + case 7: + return OPTIONS; default: return null; } diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequest.java new file mode 100644 index 000000000000..1c3f4d6fc6f4 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequest.java @@ -0,0 +1,2453 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * HTTP request.
+ *
+ * The task will be pushed to the worker as an HTTP request. An HTTP request
+ * embodies a url, an http method, headers, body and authorization for the http
+ * task.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpRequest} + */ +public final class HttpRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.HttpRequest) + HttpRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpRequest.newBuilder() to construct. + private HttpRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpRequest() { + url_ = ""; + httpMethod_ = 0; + body_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpRequest.class, + com.google.cloud.tasks.v2beta2.HttpRequest.Builder.class); + } + + private int authorizationHeaderCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authorizationHeader_; + + public enum AuthorizationHeaderCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OAUTH_TOKEN(5), + OIDC_TOKEN(6), + AUTHORIZATIONHEADER_NOT_SET(0); + private final int value; + + private AuthorizationHeaderCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizationHeaderCase valueOf(int value) { + return forNumber(value); + } + + public static AuthorizationHeaderCase forNumber(int value) { + switch (value) { + case 5: + return OAUTH_TOKEN; + case 6: + return OIDC_TOKEN; + case 0: + return AUTHORIZATIONHEADER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public static final int URL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + * + * + *
+   * Required. The full url path that the request will be sent to.
+   *
+   * This string must begin with either "http://" or "https://". Some examples
+   * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+   * encode some characters for safety and compatibility. The maximum allowed
+   * URL length is 2083 characters after encoding.
+   *
+   * The `Location` header response from a redirect response [`300` - `399`]
+   * may be followed. The redirect is not counted as a separate attempt.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The full url path that the request will be sent to.
+   *
+   * This string must begin with either "http://" or "https://". Some examples
+   * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+   * encode some characters for safety and compatibility. The maximum allowed
+   * URL length is 2083 characters after encoding.
+   *
+   * The `Location` header response from a redirect response [`300` - `399`]
+   * may be followed. The redirect is not counted as a separate attempt.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_METHOD_FIELD_NUMBER = 2; + private int httpMethod_ = 0; + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = + com.google.cloud.tasks.v2beta2.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + + public static final int HEADERS_FIELD_NUMBER = 3; + + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField headers_; + + private com.google.protobuf.MapField internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField(HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BODY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * HTTP request body.
+   *
+   * A request body is allowed only if the
+   * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST,
+   * PUT, or PATCH. It is an error to set body on a task with an incompatible
+   * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + + public static final int OAUTH_TOKEN_FIELD_NUMBER = 5; + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + + public static final int OIDC_TOKEN_FIELD_NUMBER = 6; + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getOidcToken() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(2, httpMethod_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetHeaders(), HeadersDefaultEntryHolder.defaultEntry, 3); + if (!body_.isEmpty()) { + output.writeBytes(4, body_); + } + if (authorizationHeaderCase_ == 5) { + output.writeMessage(5, (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + output.writeMessage(6, (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, httpMethod_); + } + for (java.util.Map.Entry entry : + internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry headers__ = + HeadersDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, headers__); + } + if (!body_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, body_); + } + if (authorizationHeaderCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.HttpRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.HttpRequest other = + (com.google.cloud.tasks.v2beta2.HttpRequest) obj; + + if (!getUrl().equals(other.getUrl())) return false; + if (httpMethod_ != other.httpMethod_) return false; + if (!internalGetHeaders().equals(other.internalGetHeaders())) return false; + if (!getBody().equals(other.getBody())) return false; + if (!getAuthorizationHeaderCase().equals(other.getAuthorizationHeaderCase())) return false; + switch (authorizationHeaderCase_) { + case 5: + if (!getOauthToken().equals(other.getOauthToken())) return false; + break; + case 6: + if (!getOidcToken().equals(other.getOidcToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; + hash = (53 * hash) + httpMethod_; + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + switch (authorizationHeaderCase_) { + case 5: + hash = (37 * hash) + OAUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOauthToken().hashCode(); + break; + case 6: + hash = (37 * hash) + OIDC_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOidcToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.HttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * HTTP request.
+   *
+   * The task will be pushed to the worker as an HTTP request. An HTTP request
+   * embodies a url, an http method, headers, body and authorization for the http
+   * task.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.HttpRequest) + com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableHeaders(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpRequest.class, + com.google.cloud.tasks.v2beta2.HttpRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.HttpRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + url_ = ""; + httpMethod_ = 0; + internalGetMutableHeaders().clear(); + body_ = com.google.protobuf.ByteString.EMPTY; + if (oauthTokenBuilder_ != null) { + oauthTokenBuilder_.clear(); + } + if (oidcTokenBuilder_ != null) { + oidcTokenBuilder_.clear(); + } + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest build() { + com.google.cloud.tasks.v2beta2.HttpRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest buildPartial() { + com.google.cloud.tasks.v2beta2.HttpRequest result = + new com.google.cloud.tasks.v2beta2.HttpRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.HttpRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpMethod_ = httpMethod_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.headers_ = internalGetHeaders(); + result.headers_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.body_ = body_; + } + } + + private void buildPartialOneofs(com.google.cloud.tasks.v2beta2.HttpRequest result) { + result.authorizationHeaderCase_ = authorizationHeaderCase_; + result.authorizationHeader_ = this.authorizationHeader_; + if (authorizationHeaderCase_ == 5 && oauthTokenBuilder_ != null) { + result.authorizationHeader_ = oauthTokenBuilder_.build(); + } + if (authorizationHeaderCase_ == 6 && oidcTokenBuilder_ != null) { + result.authorizationHeader_ = oidcTokenBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.HttpRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.HttpRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.HttpRequest other) { + if (other == com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.httpMethod_ != 0) { + setHttpMethodValue(other.getHttpMethodValue()); + } + internalGetMutableHeaders().mergeFrom(other.internalGetHeaders()); + bitField0_ |= 0x00000004; + if (other.getBody() != com.google.protobuf.ByteString.EMPTY) { + setBody(other.getBody()); + } + switch (other.getAuthorizationHeaderCase()) { + case OAUTH_TOKEN: + { + mergeOauthToken(other.getOauthToken()); + break; + } + case OIDC_TOKEN: + { + mergeOidcToken(other.getOidcToken()); + break; + } + case AUTHORIZATIONHEADER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + httpMethod_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.protobuf.MapEntry headers__ = + input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableHeaders() + .getMutableMap() + .put(headers__.getKey(), headers__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + body_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getOauthTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getOidcTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int authorizationHeaderCase_ = 0; + private java.lang.Object authorizationHeader_; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public Builder clearAuthorizationHeader() { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + * + * + *
+     * Required. The full url path that the request will be sent to.
+     *
+     * This string must begin with either "http://" or "https://". Some examples
+     * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+     * encode some characters for safety and compatibility. The maximum allowed
+     * URL length is 2083 characters after encoding.
+     *
+     * The `Location` header response from a redirect response [`300` - `399`]
+     * may be followed. The redirect is not counted as a separate attempt.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The full url path that the request will be sent to.
+     *
+     * This string must begin with either "http://" or "https://". Some examples
+     * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+     * encode some characters for safety and compatibility. The maximum allowed
+     * URL length is 2083 characters after encoding.
+     *
+     * The `Location` header response from a redirect response [`300` - `399`]
+     * may be followed. The redirect is not counted as a separate attempt.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The full url path that the request will be sent to.
+     *
+     * This string must begin with either "http://" or "https://". Some examples
+     * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+     * encode some characters for safety and compatibility. The maximum allowed
+     * URL length is 2083 characters after encoding.
+     *
+     * The `Location` header response from a redirect response [`300` - `399`]
+     * may be followed. The redirect is not counted as a separate attempt.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full url path that the request will be sent to.
+     *
+     * This string must begin with either "http://" or "https://". Some examples
+     * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+     * encode some characters for safety and compatibility. The maximum allowed
+     * URL length is 2083 characters after encoding.
+     *
+     * The `Location` header response from a redirect response [`300` - `399`]
+     * may be followed. The redirect is not counted as a separate attempt.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The full url path that the request will be sent to.
+     *
+     * This string must begin with either "http://" or "https://". Some examples
+     * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+     * encode some characters for safety and compatibility. The maximum allowed
+     * URL length is 2083 characters after encoding.
+     *
+     * The `Location` header response from a redirect response [`300` - `399`]
+     * may be followed. The redirect is not counted as a separate attempt.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int httpMethod_ = 0; + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @param value The enum numeric value on the wire for httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethodValue(int value) { + httpMethod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = + com.google.cloud.tasks.v2beta2.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @param value The httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethod(com.google.cloud.tasks.v2beta2.HttpMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + httpMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return This builder for chaining. + */ + public Builder clearHttpMethod() { + bitField0_ = (bitField0_ & ~0x00000002); + httpMethod_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField headers_; + + private com.google.protobuf.MapField internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField(HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + private com.google.protobuf.MapField + internalGetMutableHeaders() { + if (headers_ == null) { + headers_ = com.google.protobuf.MapField.newMapField(HeadersDefaultEntryHolder.defaultEntry); + } + if (!headers_.isMutable()) { + headers_ = headers_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + @java.lang.Override + public java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeaders() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableHeaders().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + public Builder removeHeaders(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableHeaders().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHeaders() { + bitField0_ |= 0x00000004; + return internalGetMutableHeaders().getMutableMap(); + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + public Builder putHeaders(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableHeaders().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * HTTP request headers.
+     *
+     * This map contains the header field names and values.
+     * Headers can be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     *
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * 
+ * + * map<string, string> headers = 3; + */ + public Builder putAllHeaders(java.util.Map values) { + internalGetMutableHeaders().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * HTTP request body.
+     *
+     * A request body is allowed only if the
+     * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST,
+     * PUT, or PATCH. It is an error to set body on a task with an incompatible
+     * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes body = 4; + * + * @return The body. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBody() { + return body_; + } + /** + * + * + *
+     * HTTP request body.
+     *
+     * A request body is allowed only if the
+     * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST,
+     * PUT, or PATCH. It is an error to set body on a task with an incompatible
+     * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes body = 4; + * + * @param value The body to set. + * @return This builder for chaining. + */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * HTTP request body.
+     *
+     * A request body is allowed only if the
+     * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST,
+     * PUT, or PATCH. It is an error to set body on a task with an incompatible
+     * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes body = 4; + * + * @return This builder for chaining. + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000008); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder> + oauthTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 5) { + return oauthTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken(com.google.cloud.tasks.v2beta2.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oauthTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken( + com.google.cloud.tasks.v2beta2.OAuthToken.Builder builderForValue) { + if (oauthTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oauthTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder mergeOauthToken(com.google.cloud.tasks.v2beta2.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta2.OAuthToken.newBuilder( + (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 5) { + oauthTokenBuilder_.mergeFrom(value); + } else { + oauthTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder clearOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oauthTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public com.google.cloud.tasks.v2beta2.OAuthToken.Builder getOauthTokenBuilder() { + return getOauthTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if ((authorizationHeaderCase_ == 5) && (oauthTokenBuilder_ != null)) { + return oauthTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder> + getOauthTokenFieldBuilder() { + if (oauthTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 5)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + oauthTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder>( + (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 5; + onChanged(); + return oauthTokenBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder> + oidcTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 6) { + return oidcTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta2.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oidcTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta2.OidcToken.Builder builderForValue) { + if (oidcTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oidcTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder mergeOidcToken(com.google.cloud.tasks.v2beta2.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta2.OidcToken.newBuilder( + (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 6) { + oidcTokenBuilder_.mergeFrom(value); + } else { + oidcTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder clearOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oidcTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public com.google.cloud.tasks.v2beta2.OidcToken.Builder getOidcTokenBuilder() { + return getOidcTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if ((authorizationHeaderCase_ == 6) && (oidcTokenBuilder_ != null)) { + return oidcTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder> + getOidcTokenFieldBuilder() { + if (oidcTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 6)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + oidcTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder>( + (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 6; + onChanged(); + return oidcTokenBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.HttpRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.HttpRequest) + private static final com.google.cloud.tasks.v2beta2.HttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.HttpRequest(); + } + + public static com.google.cloud.tasks.v2beta2.HttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequestOrBuilder.java new file mode 100644 index 000000000000..88758063abe2 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpRequestOrBuilder.java @@ -0,0 +1,433 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface HttpRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.HttpRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The full url path that the request will be sent to.
+   *
+   * This string must begin with either "http://" or "https://". Some examples
+   * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+   * encode some characters for safety and compatibility. The maximum allowed
+   * URL length is 2083 characters after encoding.
+   *
+   * The `Location` header response from a redirect response [`300` - `399`]
+   * may be followed. The redirect is not counted as a separate attempt.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+   * Required. The full url path that the request will be sent to.
+   *
+   * This string must begin with either "http://" or "https://". Some examples
+   * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
+   * encode some characters for safety and compatibility. The maximum allowed
+   * URL length is 2083 characters after encoding.
+   *
+   * The `Location` header response from a redirect response [`300` - `399`]
+   * may be followed. The redirect is not counted as a separate attempt.
+   * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + int getHttpMethodValue(); + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod(); + + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + int getHeadersCount(); + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + boolean containsHeaders(java.lang.String key); + /** Use {@link #getHeadersMap()} instead. */ + @java.lang.Deprecated + java.util.Map getHeaders(); + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + java.util.Map getHeadersMap(); + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + /* nullable */ + java.lang.String getHeadersOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * HTTP request headers.
+   *
+   * This map contains the header field names and values.
+   * Headers can be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   *
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * 
+ * + * map<string, string> headers = 3; + */ + java.lang.String getHeadersOrThrow(java.lang.String key); + + /** + * + * + *
+   * HTTP request body.
+   *
+   * A request body is allowed only if the
+   * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST,
+   * PUT, or PATCH. It is an error to set body on a task with an incompatible
+   * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+   * 
+ * + * bytes body = 4; + * + * @return The body. + */ + com.google.protobuf.ByteString getBody(); + + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + boolean hasOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder(); + + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + boolean hasOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + com.google.cloud.tasks.v2beta2.OidcToken getOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder(); + + com.google.cloud.tasks.v2beta2.HttpRequest.AuthorizationHeaderCase getAuthorizationHeaderCase(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTarget.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTarget.java new file mode 100644 index 000000000000..db886ae1e495 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTarget.java @@ -0,0 +1,4582 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * HTTP target.
+ *
+ * When specified as a [Queue][target_type], all the tasks with [HttpRequest]
+ * will be overridden according to the target.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget} + */ +public final class HttpTarget extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.HttpTarget) + HttpTargetOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpTarget.newBuilder() to construct. + private HttpTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpTarget() { + httpMethod_ = 0; + headerOverrides_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpTarget(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.class, + com.google.cloud.tasks.v2beta2.HttpTarget.Builder.class); + } + + public interface HeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.HttpTarget.Header) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The key of the header.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+     * The key of the header.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * The value of the header.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The value of the header.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + /** + * + * + *
+   * Defines a header message. A header can have a key and a value.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget.Header} + */ + public static final class Header extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.HttpTarget.Header) + HeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use Header.newBuilder() to construct. + private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Header() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Header(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.Header.class, + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+     * The key of the header.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+     * The key of the header.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+     * The value of the header.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The value of the header.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.HttpTarget.Header)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.HttpTarget.Header other = + (com.google.cloud.tasks.v2beta2.HttpTarget.Header) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.HttpTarget.Header prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Defines a header message. A header can have a key and a value.
+     * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget.Header} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.HttpTarget.Header) + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.Header.class, + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.HttpTarget.Header.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.Header getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.Header build() { + com.google.cloud.tasks.v2beta2.HttpTarget.Header result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.Header buildPartial() { + com.google.cloud.tasks.v2beta2.HttpTarget.Header result = + new com.google.cloud.tasks.v2beta2.HttpTarget.Header(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.HttpTarget.Header result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.HttpTarget.Header) { + return mergeFrom((com.google.cloud.tasks.v2beta2.HttpTarget.Header) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.HttpTarget.Header other) { + if (other == com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+       * The key of the header.
+       * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The key of the header.
+       * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The key of the header.
+       * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The key of the header.
+       * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The key of the header.
+       * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The value of the header.
+       * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The value of the header.
+       * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The value of the header.
+       * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The value of the header.
+       * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The value of the header.
+       * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.HttpTarget.Header) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.HttpTarget.Header) + private static final com.google.cloud.tasks.v2beta2.HttpTarget.Header DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.HttpTarget.Header(); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
PARSER = + new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.Header getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HeaderOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return The header. + */ + com.google.cloud.tasks.v2beta2.HttpTarget.Header getHeader(); + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder getHeaderOrBuilder(); + } + /** + * + * + *
+   * Wraps the Header object.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride} + */ + public static final class HeaderOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) + HeaderOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use HeaderOverride.newBuilder() to construct. + private HeaderOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HeaderOverride() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HeaderOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.class, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta2.HttpTarget.Header header_; + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.Header getHeader() { + return header_ == null + ? com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance() + : header_; + } + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance() + : header_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (header_ != null) { + output.writeMessage(1, getHeader()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride other = + (com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Wraps the Header object.
+     * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.class, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride build() { + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride buildPartial() { + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride result = + new com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride other) { + if (other == com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta2.HttpTarget.Header header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.Header, + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * + * @return The header. + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.Header getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public Builder setHeader(com.google.cloud.tasks.v2beta2.HttpTarget.Header value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public Builder setHeader( + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public Builder mergeHeader(com.google.cloud.tasks.v2beta2.HttpTarget.Header value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.cloud.tasks.v2beta2.HttpTarget.Header.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.Header, + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.Header, + com.google.cloud.tasks.v2beta2.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride) + private static final com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride(); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeaderOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int authorizationHeaderCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authorizationHeader_; + + public enum AuthorizationHeaderCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OAUTH_TOKEN(5), + OIDC_TOKEN(6), + AUTHORIZATIONHEADER_NOT_SET(0); + private final int value; + + private AuthorizationHeaderCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizationHeaderCase valueOf(int value) { + return forNumber(value); + } + + public static AuthorizationHeaderCase forNumber(int value) { + switch (value) { + case 5: + return OAUTH_TOKEN; + case 6: + return OIDC_TOKEN; + case 0: + return AUTHORIZATIONHEADER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public static final int URI_OVERRIDE_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta2.UriOverride uriOverride_; + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + @java.lang.Override + public boolean hasUriOverride() { + return uriOverride_ != null; + } + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride getUriOverride() { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance() + : uriOverride_; + } + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder getUriOverrideOrBuilder() { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance() + : uriOverride_; + } + + public static final int HTTP_METHOD_FIELD_NUMBER = 2; + private int httpMethod_ = 0; + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = + com.google.cloud.tasks.v2beta2.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + + public static final int HEADER_OVERRIDES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List headerOverrides_; + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public java.util.List + getHeaderOverridesList() { + return headerOverrides_; + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public java.util.List + getHeaderOverridesOrBuilderList() { + return headerOverrides_; + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public int getHeaderOverridesCount() { + return headerOverrides_.size(); + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getHeaderOverrides(int index) { + return headerOverrides_.get(index); + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder + getHeaderOverridesOrBuilder(int index) { + return headerOverrides_.get(index); + } + + public static final int OAUTH_TOKEN_FIELD_NUMBER = 5; + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + + public static final int OIDC_TOKEN_FIELD_NUMBER = 6; + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getOidcToken() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (uriOverride_ != null) { + output.writeMessage(1, getUriOverride()); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(2, httpMethod_); + } + for (int i = 0; i < headerOverrides_.size(); i++) { + output.writeMessage(3, headerOverrides_.get(i)); + } + if (authorizationHeaderCase_ == 5) { + output.writeMessage(5, (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + output.writeMessage(6, (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (uriOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUriOverride()); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, httpMethod_); + } + for (int i = 0; i < headerOverrides_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, headerOverrides_.get(i)); + } + if (authorizationHeaderCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.HttpTarget)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.HttpTarget other = + (com.google.cloud.tasks.v2beta2.HttpTarget) obj; + + if (hasUriOverride() != other.hasUriOverride()) return false; + if (hasUriOverride()) { + if (!getUriOverride().equals(other.getUriOverride())) return false; + } + if (httpMethod_ != other.httpMethod_) return false; + if (!getHeaderOverridesList().equals(other.getHeaderOverridesList())) return false; + if (!getAuthorizationHeaderCase().equals(other.getAuthorizationHeaderCase())) return false; + switch (authorizationHeaderCase_) { + case 5: + if (!getOauthToken().equals(other.getOauthToken())) return false; + break; + case 6: + if (!getOidcToken().equals(other.getOidcToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUriOverride()) { + hash = (37 * hash) + URI_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getUriOverride().hashCode(); + } + hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; + hash = (53 * hash) + httpMethod_; + if (getHeaderOverridesCount() > 0) { + hash = (37 * hash) + HEADER_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + getHeaderOverridesList().hashCode(); + } + switch (authorizationHeaderCase_) { + case 5: + hash = (37 * hash) + OAUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOauthToken().hashCode(); + break; + case 6: + hash = (37 * hash) + OIDC_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOidcToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.HttpTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * HTTP target.
+   *
+   * When specified as a [Queue][target_type], all the tasks with [HttpRequest]
+   * will be overridden according to the target.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.HttpTarget} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.HttpTarget) + com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.HttpTarget.class, + com.google.cloud.tasks.v2beta2.HttpTarget.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.HttpTarget.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uriOverride_ = null; + if (uriOverrideBuilder_ != null) { + uriOverrideBuilder_.dispose(); + uriOverrideBuilder_ = null; + } + httpMethod_ = 0; + if (headerOverridesBuilder_ == null) { + headerOverrides_ = java.util.Collections.emptyList(); + } else { + headerOverrides_ = null; + headerOverridesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (oauthTokenBuilder_ != null) { + oauthTokenBuilder_.clear(); + } + if (oidcTokenBuilder_ != null) { + oidcTokenBuilder_.clear(); + } + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget build() { + com.google.cloud.tasks.v2beta2.HttpTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget buildPartial() { + com.google.cloud.tasks.v2beta2.HttpTarget result = + new com.google.cloud.tasks.v2beta2.HttpTarget(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.tasks.v2beta2.HttpTarget result) { + if (headerOverridesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + headerOverrides_ = java.util.Collections.unmodifiableList(headerOverrides_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.headerOverrides_ = headerOverrides_; + } else { + result.headerOverrides_ = headerOverridesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.HttpTarget result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uriOverride_ = + uriOverrideBuilder_ == null ? uriOverride_ : uriOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpMethod_ = httpMethod_; + } + } + + private void buildPartialOneofs(com.google.cloud.tasks.v2beta2.HttpTarget result) { + result.authorizationHeaderCase_ = authorizationHeaderCase_; + result.authorizationHeader_ = this.authorizationHeader_; + if (authorizationHeaderCase_ == 5 && oauthTokenBuilder_ != null) { + result.authorizationHeader_ = oauthTokenBuilder_.build(); + } + if (authorizationHeaderCase_ == 6 && oidcTokenBuilder_ != null) { + result.authorizationHeader_ = oidcTokenBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.HttpTarget) { + return mergeFrom((com.google.cloud.tasks.v2beta2.HttpTarget) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.HttpTarget other) { + if (other == com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance()) return this; + if (other.hasUriOverride()) { + mergeUriOverride(other.getUriOverride()); + } + if (other.httpMethod_ != 0) { + setHttpMethodValue(other.getHttpMethodValue()); + } + if (headerOverridesBuilder_ == null) { + if (!other.headerOverrides_.isEmpty()) { + if (headerOverrides_.isEmpty()) { + headerOverrides_ = other.headerOverrides_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureHeaderOverridesIsMutable(); + headerOverrides_.addAll(other.headerOverrides_); + } + onChanged(); + } + } else { + if (!other.headerOverrides_.isEmpty()) { + if (headerOverridesBuilder_.isEmpty()) { + headerOverridesBuilder_.dispose(); + headerOverridesBuilder_ = null; + headerOverrides_ = other.headerOverrides_; + bitField0_ = (bitField0_ & ~0x00000004); + headerOverridesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHeaderOverridesFieldBuilder() + : null; + } else { + headerOverridesBuilder_.addAllMessages(other.headerOverrides_); + } + } + } + switch (other.getAuthorizationHeaderCase()) { + case OAUTH_TOKEN: + { + mergeOauthToken(other.getOauthToken()); + break; + } + case OIDC_TOKEN: + { + mergeOidcToken(other.getOidcToken()); + break; + } + case AUTHORIZATIONHEADER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUriOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + httpMethod_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride m = + input.readMessage( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.parser(), + extensionRegistry); + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(m); + } else { + headerOverridesBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + input.readMessage(getOauthTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getOidcTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int authorizationHeaderCase_ = 0; + private java.lang.Object authorizationHeader_; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public Builder clearAuthorizationHeader() { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta2.UriOverride uriOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.UriOverride, + com.google.cloud.tasks.v2beta2.UriOverride.Builder, + com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder> + uriOverrideBuilder_; + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + public boolean hasUriOverride() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + public com.google.cloud.tasks.v2beta2.UriOverride getUriOverride() { + if (uriOverrideBuilder_ == null) { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance() + : uriOverride_; + } else { + return uriOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public Builder setUriOverride(com.google.cloud.tasks.v2beta2.UriOverride value) { + if (uriOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + uriOverride_ = value; + } else { + uriOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public Builder setUriOverride( + com.google.cloud.tasks.v2beta2.UriOverride.Builder builderForValue) { + if (uriOverrideBuilder_ == null) { + uriOverride_ = builderForValue.build(); + } else { + uriOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public Builder mergeUriOverride(com.google.cloud.tasks.v2beta2.UriOverride value) { + if (uriOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && uriOverride_ != null + && uriOverride_ != com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance()) { + getUriOverrideBuilder().mergeFrom(value); + } else { + uriOverride_ = value; + } + } else { + uriOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public Builder clearUriOverride() { + bitField0_ = (bitField0_ & ~0x00000001); + uriOverride_ = null; + if (uriOverrideBuilder_ != null) { + uriOverrideBuilder_.dispose(); + uriOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public com.google.cloud.tasks.v2beta2.UriOverride.Builder getUriOverrideBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUriOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + public com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder getUriOverrideOrBuilder() { + if (uriOverrideBuilder_ != null) { + return uriOverrideBuilder_.getMessageOrBuilder(); + } else { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance() + : uriOverride_; + } + } + /** + * + * + *
+     * Uri override.
+     *
+     * When specified, overrides the execution Uri for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.UriOverride, + com.google.cloud.tasks.v2beta2.UriOverride.Builder, + com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder> + getUriOverrideFieldBuilder() { + if (uriOverrideBuilder_ == null) { + uriOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.UriOverride, + com.google.cloud.tasks.v2beta2.UriOverride.Builder, + com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder>( + getUriOverride(), getParentForChildren(), isClean()); + uriOverride_ = null; + } + return uriOverrideBuilder_; + } + + private int httpMethod_ = 0; + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @param value The enum numeric value on the wire for httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethodValue(int value) { + httpMethod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = + com.google.cloud.tasks.v2beta2.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @param value The httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethod(com.google.cloud.tasks.v2beta2.HttpMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + httpMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return This builder for chaining. + */ + public Builder clearHttpMethod() { + bitField0_ = (bitField0_ & ~0x00000002); + httpMethod_ = 0; + onChanged(); + return this; + } + + private java.util.List + headerOverrides_ = java.util.Collections.emptyList(); + + private void ensureHeaderOverridesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + headerOverrides_ = + new java.util.ArrayList( + headerOverrides_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder> + headerOverridesBuilder_; + + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List + getHeaderOverridesList() { + if (headerOverridesBuilder_ == null) { + return java.util.Collections.unmodifiableList(headerOverrides_); + } else { + return headerOverridesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public int getHeaderOverridesCount() { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.size(); + } else { + return headerOverridesBuilder_.getCount(); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getHeaderOverrides(int index) { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.get(index); + } else { + return headerOverridesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder setHeaderOverrides( + int index, com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.set(index, value); + onChanged(); + } else { + headerOverridesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder setHeaderOverrides( + int index, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.set(index, builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(value); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + int index, com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(index, value); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + int index, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(index, builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addAllHeaderOverrides( + java.lang.Iterable + values) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headerOverrides_); + onChanged(); + } else { + headerOverridesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder clearHeaderOverrides() { + if (headerOverridesBuilder_ == null) { + headerOverrides_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + headerOverridesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder removeHeaderOverrides(int index) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.remove(index); + onChanged(); + } else { + headerOverridesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder + getHeaderOverridesBuilder(int index) { + return getHeaderOverridesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder + getHeaderOverridesOrBuilder(int index) { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.get(index); + } else { + return headerOverridesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder> + getHeaderOverridesOrBuilderList() { + if (headerOverridesBuilder_ != null) { + return headerOverridesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headerOverrides_); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder + addHeaderOverridesBuilder() { + return getHeaderOverridesFieldBuilder() + .addBuilder( + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder + addHeaderOverridesBuilder(int index) { + return getHeaderOverridesFieldBuilder() + .addBuilder( + index, com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will accompany the
+     * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Any header that is prefixed with "X-CloudTasks-" will be treated
+     * as service header. Service headers define properties of the task and are
+     * predefined in CloudTask.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     * * User-Agent: This will be set to `"Google-CloudTasks"`.
+     * * `X-Google-*`: Google use only.
+     * * `X-AppEngine-*`: Google use only.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List + getHeaderOverridesBuilderList() { + return getHeaderOverridesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder> + getHeaderOverridesFieldBuilder() { + if (headerOverridesBuilder_ == null) { + headerOverridesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder>( + headerOverrides_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + headerOverrides_ = null; + } + return headerOverridesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder> + oauthTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 5) { + return oauthTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken(com.google.cloud.tasks.v2beta2.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oauthTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken( + com.google.cloud.tasks.v2beta2.OAuthToken.Builder builderForValue) { + if (oauthTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oauthTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder mergeOauthToken(com.google.cloud.tasks.v2beta2.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta2.OAuthToken.newBuilder( + (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 5) { + oauthTokenBuilder_.mergeFrom(value); + } else { + oauthTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public Builder clearOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oauthTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + public com.google.cloud.tasks.v2beta2.OAuthToken.Builder getOauthTokenBuilder() { + return getOauthTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if ((authorizationHeaderCase_ == 5) && (oauthTokenBuilder_ != null)) { + return oauthTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as an `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder> + getOauthTokenFieldBuilder() { + if (oauthTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 5)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + oauthTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OAuthToken, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder, + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder>( + (com.google.cloud.tasks.v2beta2.OAuthToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 5; + onChanged(); + return oauthTokenBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder> + oidcTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 6) { + return oidcTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta2.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oidcTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta2.OidcToken.Builder builderForValue) { + if (oidcTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oidcTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder mergeOidcToken(com.google.cloud.tasks.v2beta2.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta2.OidcToken.newBuilder( + (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 6) { + oidcTokenBuilder_.mergeFrom(value); + } else { + oidcTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public Builder clearOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oidcTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + public com.google.cloud.tasks.v2beta2.OidcToken.Builder getOidcTokenBuilder() { + return getOidcTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if ((authorizationHeaderCase_ == 6) && (oidcTokenBuilder_ != null)) { + return oidcTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder> + getOidcTokenFieldBuilder() { + if (oidcTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 6)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + oidcTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.OidcToken, + com.google.cloud.tasks.v2beta2.OidcToken.Builder, + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder>( + (com.google.cloud.tasks.v2beta2.OidcToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 6; + onChanged(); + return oidcTokenBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.HttpTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.HttpTarget) + private static final com.google.cloud.tasks.v2beta2.HttpTarget DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.HttpTarget(); + } + + public static com.google.cloud.tasks.v2beta2.HttpTarget getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTargetOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTargetOrBuilder.java new file mode 100644 index 000000000000..13e7ba422f40 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpTargetOrBuilder.java @@ -0,0 +1,425 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface HttpTargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.HttpTarget) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + boolean hasUriOverride(); + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + com.google.cloud.tasks.v2beta2.UriOverride getUriOverride(); + /** + * + * + *
+   * Uri override.
+   *
+   * When specified, overrides the execution Uri for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder getUriOverrideOrBuilder(); + + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + int getHttpMethodValue(); + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod(); + + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + java.util.List getHeaderOverridesList(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride getHeaderOverrides(int index); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + int getHeaderOverridesCount(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + java.util.List + getHeaderOverridesOrBuilderList(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will accompany the
+   * task's HTTP request. Some HTTP request headers will be ignored or replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Any header that is prefixed with "X-CloudTasks-" will be treated
+   * as service header. Service headers define properties of the task and are
+   * predefined in CloudTask.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   *   [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   * * User-Agent: This will be set to `"Google-CloudTasks"`.
+   * * `X-Google-*`: Google use only.
+   * * `X-AppEngine-*`: Google use only.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example, `Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + com.google.cloud.tasks.v2beta2.HttpTarget.HeaderOverrideOrBuilder getHeaderOverridesOrBuilder( + int index); + + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + boolean hasOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + com.google.cloud.tasks.v2beta2.OAuthToken getOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as an `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + */ + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder getOauthTokenOrBuilder(); + + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + boolean hasOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + com.google.cloud.tasks.v2beta2.OidcToken getOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + */ + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder getOidcTokenOrBuilder(); + + com.google.cloud.tasks.v2beta2.HttpTarget.AuthorizationHeaderCase getAuthorizationHeaderCase(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthToken.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthToken.java new file mode 100644 index 000000000000..cad159248503 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthToken.java @@ -0,0 +1,853 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Contains information needed for generating an
+ * [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
+ * This type of authorization should generally only be used when calling Google
+ * APIs hosted on *.googleapis.com.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.OAuthToken} + */ +public final class OAuthToken extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.OAuthToken) + OAuthTokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use OAuthToken.newBuilder() to construct. + private OAuthToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OAuthToken() { + serviceAccountEmail_ = ""; + scope_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OAuthToken(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OAuthToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.OAuthToken.class, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder.class); + } + + public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountEmail_ = ""; + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OAuth token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + @java.lang.Override + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + 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(); + serviceAccountEmail_ = s; + return s; + } + } + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OAuth token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object scope_ = ""; + /** + * + * + *
+   * OAuth scope to be used for generating OAuth access token.
+   * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+   * will be used.
+   * 
+ * + * string scope = 2; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + 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(); + scope_ = s; + return s; + } + } + /** + * + * + *
+   * OAuth scope to be used for generating OAuth access token.
+   * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+   * will be used.
+   * 
+ * + * string scope = 2; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scope_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, scope_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.OAuthToken)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.OAuthToken other = + (com.google.cloud.tasks.v2beta2.OAuthToken) obj; + + if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; + if (!getScope().equals(other.getScope())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountEmail().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.OAuthToken prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains information needed for generating an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
+   * This type of authorization should generally only be used when calling Google
+   * APIs hosted on *.googleapis.com.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.OAuthToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.OAuthToken) + com.google.cloud.tasks.v2beta2.OAuthTokenOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OAuthToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.OAuthToken.class, + com.google.cloud.tasks.v2beta2.OAuthToken.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.OAuthToken.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAccountEmail_ = ""; + scope_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken build() { + com.google.cloud.tasks.v2beta2.OAuthToken result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken buildPartial() { + com.google.cloud.tasks.v2beta2.OAuthToken result = + new com.google.cloud.tasks.v2beta2.OAuthToken(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.OAuthToken result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAccountEmail_ = serviceAccountEmail_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.scope_ = scope_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.OAuthToken) { + return mergeFrom((com.google.cloud.tasks.v2beta2.OAuthToken) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.OAuthToken other) { + if (other == com.google.cloud.tasks.v2beta2.OAuthToken.getDefaultInstance()) return this; + if (!other.getServiceAccountEmail().isEmpty()) { + serviceAccountEmail_ = other.serviceAccountEmail_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + scope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object serviceAccountEmail_ = ""; + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OAuth token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OAuth token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OAuth token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @param value The serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OAuth token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountEmail() { + serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OAuth token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @param value The bytes for serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object scope_ = ""; + /** + * + * + *
+     * OAuth scope to be used for generating OAuth access token.
+     * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+     * will be used.
+     * 
+ * + * string scope = 2; + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * OAuth scope to be used for generating OAuth access token.
+     * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+     * will be used.
+     * 
+ * + * string scope = 2; + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * OAuth scope to be used for generating OAuth access token.
+     * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+     * will be used.
+     * 
+ * + * string scope = 2; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * OAuth scope to be used for generating OAuth access token.
+     * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+     * will be used.
+     * 
+ * + * string scope = 2; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = getDefaultInstance().getScope(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * OAuth scope to be used for generating OAuth access token.
+     * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+     * will be used.
+     * 
+ * + * string scope = 2; + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scope_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.OAuthToken) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.OAuthToken) + private static final com.google.cloud.tasks.v2beta2.OAuthToken DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.OAuthToken(); + } + + public static com.google.cloud.tasks.v2beta2.OAuthToken getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthToken parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OAuthToken getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthTokenOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthTokenOrBuilder.java new file mode 100644 index 000000000000..b07af574be28 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OAuthTokenOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface OAuthTokenOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.OAuthToken) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OAuth token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + java.lang.String getServiceAccountEmail(); + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OAuth token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + com.google.protobuf.ByteString getServiceAccountEmailBytes(); + + /** + * + * + *
+   * OAuth scope to be used for generating OAuth access token.
+   * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+   * will be used.
+   * 
+ * + * string scope = 2; + * + * @return The scope. + */ + java.lang.String getScope(); + /** + * + * + *
+   * OAuth scope to be used for generating OAuth access token.
+   * If not specified, "https://www.googleapis.com/auth/cloud-platform"
+   * will be used.
+   * 
+ * + * string scope = 2; + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcToken.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcToken.java new file mode 100644 index 000000000000..d23c107b30c2 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcToken.java @@ -0,0 +1,849 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Contains information needed for generating an
+ * [OpenID Connect
+ * token](https://developers.google.com/identity/protocols/OpenIDConnect).
+ * This type of authorization can be used for many scenarios, including
+ * calling Cloud Run, or endpoints where you intend to validate the token
+ * yourself.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.OidcToken} + */ +public final class OidcToken extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.OidcToken) + OidcTokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use OidcToken.newBuilder() to construct. + private OidcToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OidcToken() { + serviceAccountEmail_ = ""; + audience_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OidcToken(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OidcToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.OidcToken.class, + com.google.cloud.tasks.v2beta2.OidcToken.Builder.class); + } + + public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccountEmail_ = ""; + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OIDC token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + @java.lang.Override + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + 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(); + serviceAccountEmail_ = s; + return s; + } + } + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OIDC token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIENCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object audience_ = ""; + /** + * + * + *
+   * Audience to be used when generating OIDC token. If not specified, the URI
+   * specified in target will be used.
+   * 
+ * + * string audience = 2; + * + * @return The audience. + */ + @java.lang.Override + public java.lang.String getAudience() { + java.lang.Object ref = audience_; + 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(); + audience_ = s; + return s; + } + } + /** + * + * + *
+   * Audience to be used when generating OIDC token. If not specified, the URI
+   * specified in target will be used.
+   * 
+ * + * string audience = 2; + * + * @return The bytes for audience. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAudienceBytes() { + java.lang.Object ref = audience_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audience_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(audience_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audience_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.OidcToken)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.OidcToken other = (com.google.cloud.tasks.v2beta2.OidcToken) obj; + + if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; + if (!getAudience().equals(other.getAudience())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountEmail().hashCode(); + hash = (37 * hash) + AUDIENCE_FIELD_NUMBER; + hash = (53 * hash) + getAudience().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.OidcToken prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains information needed for generating an
+   * [OpenID Connect
+   * token](https://developers.google.com/identity/protocols/OpenIDConnect).
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.OidcToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.OidcToken) + com.google.cloud.tasks.v2beta2.OidcTokenOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OidcToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.OidcToken.class, + com.google.cloud.tasks.v2beta2.OidcToken.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.OidcToken.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + serviceAccountEmail_ = ""; + audience_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken build() { + com.google.cloud.tasks.v2beta2.OidcToken result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken buildPartial() { + com.google.cloud.tasks.v2beta2.OidcToken result = + new com.google.cloud.tasks.v2beta2.OidcToken(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.OidcToken result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceAccountEmail_ = serviceAccountEmail_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.audience_ = audience_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.OidcToken) { + return mergeFrom((com.google.cloud.tasks.v2beta2.OidcToken) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.OidcToken other) { + if (other == com.google.cloud.tasks.v2beta2.OidcToken.getDefaultInstance()) return this; + if (!other.getServiceAccountEmail().isEmpty()) { + serviceAccountEmail_ = other.serviceAccountEmail_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAudience().isEmpty()) { + audience_ = other.audience_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceAccountEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + audience_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object serviceAccountEmail_ = ""; + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OIDC token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + public java.lang.String getServiceAccountEmail() { + java.lang.Object ref = serviceAccountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OIDC token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + public com.google.protobuf.ByteString getServiceAccountEmailBytes() { + java.lang.Object ref = serviceAccountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OIDC token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @param value The serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccountEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OIDC token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountEmail() { + serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+     * to be used for generating OIDC token.
+     * The service account must be within the same project as the queue. The
+     * caller must have iam.serviceAccounts.actAs permission for the service
+     * account.
+     * 
+ * + * string service_account_email = 1; + * + * @param value The bytes for serviceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccountEmail_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object audience_ = ""; + /** + * + * + *
+     * Audience to be used when generating OIDC token. If not specified, the URI
+     * specified in target will be used.
+     * 
+ * + * string audience = 2; + * + * @return The audience. + */ + public java.lang.String getAudience() { + java.lang.Object ref = audience_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audience_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Audience to be used when generating OIDC token. If not specified, the URI
+     * specified in target will be used.
+     * 
+ * + * string audience = 2; + * + * @return The bytes for audience. + */ + public com.google.protobuf.ByteString getAudienceBytes() { + java.lang.Object ref = audience_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audience_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Audience to be used when generating OIDC token. If not specified, the URI
+     * specified in target will be used.
+     * 
+ * + * string audience = 2; + * + * @param value The audience to set. + * @return This builder for chaining. + */ + public Builder setAudience(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + audience_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Audience to be used when generating OIDC token. If not specified, the URI
+     * specified in target will be used.
+     * 
+ * + * string audience = 2; + * + * @return This builder for chaining. + */ + public Builder clearAudience() { + audience_ = getDefaultInstance().getAudience(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Audience to be used when generating OIDC token. If not specified, the URI
+     * specified in target will be used.
+     * 
+ * + * string audience = 2; + * + * @param value The bytes for audience to set. + * @return This builder for chaining. + */ + public Builder setAudienceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + audience_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.OidcToken) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.OidcToken) + private static final com.google.cloud.tasks.v2beta2.OidcToken DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.OidcToken(); + } + + public static com.google.cloud.tasks.v2beta2.OidcToken getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OidcToken parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.OidcToken getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcTokenOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcTokenOrBuilder.java new file mode 100644 index 000000000000..28c5f04644af --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OidcTokenOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface OidcTokenOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.OidcToken) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OIDC token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The serviceAccountEmail. + */ + java.lang.String getServiceAccountEmail(); + /** + * + * + *
+   * [Service account email](https://cloud.google.com/iam/docs/service-accounts)
+   * to be used for generating OIDC token.
+   * The service account must be within the same project as the queue. The
+   * caller must have iam.serviceAccounts.actAs permission for the service
+   * account.
+   * 
+ * + * string service_account_email = 1; + * + * @return The bytes for serviceAccountEmail. + */ + com.google.protobuf.ByteString getServiceAccountEmailBytes(); + + /** + * + * + *
+   * Audience to be used when generating OIDC token. If not specified, the URI
+   * specified in target will be used.
+   * 
+ * + * string audience = 2; + * + * @return The audience. + */ + java.lang.String getAudience(); + /** + * + * + *
+   * Audience to be used when generating OIDC token. If not specified, the URI
+   * specified in target will be used.
+   * 
+ * + * string audience = 2; + * + * @return The bytes for audience. + */ + com.google.protobuf.ByteString getAudienceBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OldTargetProto.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OldTargetProto.java new file mode 100644 index 000000000000..02448797289a --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/OldTargetProto.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/old_target.proto + +package com.google.cloud.tasks.v2beta2; + +public final class OldTargetProto { + private OldTargetProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/tasks/v2beta2/old_target." + + "proto\022\032google.cloud.tasks.v2beta2Bw\n\036com" + + ".google.cloud.tasks.v2beta2B\016OldTargetPr" + + "otoP\001ZCcloud.google.com/go/cloudtasks/ap" + + "iv2beta2/cloudtaskspb;cloudtaskspbb\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverride.java new file mode 100644 index 000000000000..aa5636dbf9f3 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverride.java @@ -0,0 +1,627 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * PathOverride.
+ *
+ * Path message defines path override for HTTP targets.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PathOverride} + */ +public final class PathOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.PathOverride) + PathOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use PathOverride.newBuilder() to construct. + private PathOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PathOverride() { + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PathOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_PathOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PathOverride.class, + com.google.cloud.tasks.v2beta2.PathOverride.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + 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(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.PathOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.PathOverride other = + (com.google.cloud.tasks.v2beta2.PathOverride) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.PathOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * PathOverride.
+   *
+   * Path message defines path override for HTTP targets.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PathOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.PathOverride) + com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_PathOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PathOverride.class, + com.google.cloud.tasks.v2beta2.PathOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.PathOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverride build() { + com.google.cloud.tasks.v2beta2.PathOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverride buildPartial() { + com.google.cloud.tasks.v2beta2.PathOverride result = + new com.google.cloud.tasks.v2beta2.PathOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.PathOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.PathOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta2.PathOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.PathOverride other) { + if (other == com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.PathOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PathOverride) + private static final com.google.cloud.tasks.v2beta2.PathOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.PathOverride(); + } + + public static com.google.cloud.tasks.v2beta2.PathOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PathOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverrideOrBuilder.java new file mode 100644 index 000000000000..36526400eeab --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PathOverrideOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface PathOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.PathOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverride.java new file mode 100644 index 000000000000..0fd5ef9dfdbf --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverride.java @@ -0,0 +1,634 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * QueryOverride.
+ *
+ * Query message defines query override for HTTP targets.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.QueryOverride} + */ +public final class QueryOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.QueryOverride) + QueryOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryOverride.newBuilder() to construct. + private QueryOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryOverride() { + queryParams_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_QueryOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.QueryOverride.class, + com.google.cloud.tasks.v2beta2.QueryOverride.Builder.class); + } + + public static final int QUERY_PARAMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object queryParams_ = ""; + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + @java.lang.Override + public java.lang.String getQueryParams() { + java.lang.Object ref = queryParams_; + 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(); + queryParams_ = s; + return s; + } + } + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryParamsBytes() { + java.lang.Object ref = queryParams_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryParams_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryParams_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryParams_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryParams_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryParams_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.QueryOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.QueryOverride other = + (com.google.cloud.tasks.v2beta2.QueryOverride) obj; + + if (!getQueryParams().equals(other.getQueryParams())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getQueryParams().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.QueryOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * QueryOverride.
+   *
+   * Query message defines query override for HTTP targets.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.QueryOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.QueryOverride) + com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_QueryOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.QueryOverride.class, + com.google.cloud.tasks.v2beta2.QueryOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.QueryOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queryParams_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverride build() { + com.google.cloud.tasks.v2beta2.QueryOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverride buildPartial() { + com.google.cloud.tasks.v2beta2.QueryOverride result = + new com.google.cloud.tasks.v2beta2.QueryOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.QueryOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queryParams_ = queryParams_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.QueryOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta2.QueryOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.QueryOverride other) { + if (other == com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance()) return this; + if (!other.getQueryParams().isEmpty()) { + queryParams_ = other.queryParams_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queryParams_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object queryParams_ = ""; + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + public java.lang.String getQueryParams() { + java.lang.Object ref = queryParams_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryParams_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + public com.google.protobuf.ByteString getQueryParamsBytes() { + java.lang.Object ref = queryParams_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryParams_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @param value The queryParams to set. + * @return This builder for chaining. + */ + public Builder setQueryParams(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryParams_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return This builder for chaining. + */ + public Builder clearQueryParams() { + queryParams_ = getDefaultInstance().getQueryParams(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @param value The bytes for queryParams to set. + * @return This builder for chaining. + */ + public Builder setQueryParamsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryParams_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.QueryOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.QueryOverride) + private static final com.google.cloud.tasks.v2beta2.QueryOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.QueryOverride(); + } + + public static com.google.cloud.tasks.v2beta2.QueryOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverrideOrBuilder.java new file mode 100644 index 000000000000..67c672a806bc --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueryOverrideOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface QueryOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.QueryOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + java.lang.String getQueryParams(); + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + com.google.protobuf.ByteString getQueryParamsBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java index e933b7f35d43..4ba3fb1806ee 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java @@ -307,6 +307,7 @@ public enum TargetTypeCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { APP_ENGINE_HTTP_TARGET(3), PULL_TARGET(4), + HTTP_TARGET(17), TARGETTYPE_NOT_SET(0); private final int value; @@ -329,6 +330,8 @@ public static TargetTypeCase forNumber(int value) { return APP_ENGINE_HTTP_TARGET; case 4: return PULL_TARGET; + case 17: + return HTTP_TARGET; case 0: return TARGETTYPE_NOT_SET; default: @@ -555,6 +558,57 @@ public com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); } + public static final int HTTP_TARGET_FIELD_NUMBER = 17; + /** + * + * + *
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return Whether the httpTarget field is set. + */ + @java.lang.Override + public boolean hasHttpTarget() { + return targetTypeCase_ == 17; + } + /** + * + * + *
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return The httpTarget. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget getHttpTarget() { + if (targetTypeCase_ == 17) { + return (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + /** + * + * + *
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder getHttpTargetOrBuilder() { + if (targetTypeCase_ == 17) { + return (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + public static final int RATE_LIMITS_FIELD_NUMBER = 5; private com.google.cloud.tasks.v2beta2.RateLimits rateLimits_; /** @@ -738,7 +792,7 @@ public com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder getRetryConfigOrBuild *
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
    * uploading
@@ -761,7 +815,7 @@ public int getStateValue() {
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
    * uploading
@@ -1118,6 +1172,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (stats_ != null) {
       output.writeMessage(16, getStats());
     }
+    if (targetTypeCase_ == 17) {
+      output.writeMessage(17, (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_);
+    }
     getUnknownFields().writeTo(output);
   }
 
@@ -1161,6 +1218,11 @@ public int getSerializedSize() {
     if (stats_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getStats());
     }
+    if (targetTypeCase_ == 17) {
+      size +=
+          com.google.protobuf.CodedOutputStream.computeMessageSize(
+              17, (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_);
+    }
     size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
@@ -1210,6 +1272,9 @@ public boolean equals(final java.lang.Object obj) {
       case 4:
         if (!getPullTarget().equals(other.getPullTarget())) return false;
         break;
+      case 17:
+        if (!getHttpTarget().equals(other.getHttpTarget())) return false;
+        break;
       case 0:
       default:
     }
@@ -1261,6 +1326,10 @@ public int hashCode() {
         hash = (37 * hash) + PULL_TARGET_FIELD_NUMBER;
         hash = (53 * hash) + getPullTarget().hashCode();
         break;
+      case 17:
+        hash = (37 * hash) + HTTP_TARGET_FIELD_NUMBER;
+        hash = (53 * hash) + getHttpTarget().hashCode();
+        break;
       case 0:
       default:
     }
@@ -1411,6 +1480,9 @@ public Builder clear() {
       if (pullTargetBuilder_ != null) {
         pullTargetBuilder_.clear();
       }
+      if (httpTargetBuilder_ != null) {
+        httpTargetBuilder_.clear();
+      }
       rateLimits_ = null;
       if (rateLimitsBuilder_ != null) {
         rateLimitsBuilder_.dispose();
@@ -1483,27 +1555,27 @@ private void buildPartial0(com.google.cloud.tasks.v2beta2.Queue result) {
       if (((from_bitField0_ & 0x00000001) != 0)) {
         result.name_ = name_;
       }
-      if (((from_bitField0_ & 0x00000008) != 0)) {
+      if (((from_bitField0_ & 0x00000010) != 0)) {
         result.rateLimits_ = rateLimitsBuilder_ == null ? rateLimits_ : rateLimitsBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000010) != 0)) {
+      if (((from_bitField0_ & 0x00000020) != 0)) {
         result.retryConfig_ =
             retryConfigBuilder_ == null ? retryConfig_ : retryConfigBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000020) != 0)) {
+      if (((from_bitField0_ & 0x00000040) != 0)) {
         result.state_ = state_;
       }
-      if (((from_bitField0_ & 0x00000040) != 0)) {
+      if (((from_bitField0_ & 0x00000080) != 0)) {
         result.purgeTime_ = purgeTimeBuilder_ == null ? purgeTime_ : purgeTimeBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000080) != 0)) {
+      if (((from_bitField0_ & 0x00000100) != 0)) {
         result.taskTtl_ = taskTtlBuilder_ == null ? taskTtl_ : taskTtlBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000100) != 0)) {
+      if (((from_bitField0_ & 0x00000200) != 0)) {
         result.tombstoneTtl_ =
             tombstoneTtlBuilder_ == null ? tombstoneTtl_ : tombstoneTtlBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000200) != 0)) {
+      if (((from_bitField0_ & 0x00000400) != 0)) {
         result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build();
       }
     }
@@ -1517,6 +1589,9 @@ private void buildPartialOneofs(com.google.cloud.tasks.v2beta2.Queue result) {
       if (targetTypeCase_ == 4 && pullTargetBuilder_ != null) {
         result.targetType_ = pullTargetBuilder_.build();
       }
+      if (targetTypeCase_ == 17 && httpTargetBuilder_ != null) {
+        result.targetType_ = httpTargetBuilder_.build();
+      }
     }
 
     @java.lang.Override
@@ -1601,6 +1676,11 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta2.Queue other) {
             mergePullTarget(other.getPullTarget());
             break;
           }
+        case HTTP_TARGET:
+          {
+            mergeHttpTarget(other.getHttpTarget());
+            break;
+          }
         case TARGETTYPE_NOT_SET:
           {
             break;
@@ -1654,45 +1734,51 @@ public Builder mergeFrom(
             case 42:
               {
                 input.readMessage(getRateLimitsFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000008;
+                bitField0_ |= 0x00000010;
                 break;
               } // case 42
             case 50:
               {
                 input.readMessage(getRetryConfigFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000010;
+                bitField0_ |= 0x00000020;
                 break;
               } // case 50
             case 56:
               {
                 state_ = input.readEnum();
-                bitField0_ |= 0x00000020;
+                bitField0_ |= 0x00000040;
                 break;
               } // case 56
             case 66:
               {
                 input.readMessage(getPurgeTimeFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000040;
+                bitField0_ |= 0x00000080;
                 break;
               } // case 66
             case 74:
               {
                 input.readMessage(getTaskTtlFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000080;
+                bitField0_ |= 0x00000100;
                 break;
               } // case 74
             case 82:
               {
                 input.readMessage(getTombstoneTtlFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000100;
+                bitField0_ |= 0x00000200;
                 break;
               } // case 82
             case 130:
               {
                 input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000200;
+                bitField0_ |= 0x00000400;
                 break;
               } // case 130
+            case 138:
+              {
+                input.readMessage(getHttpTargetFieldBuilder().getBuilder(), extensionRegistry);
+                targetTypeCase_ = 17;
+                break;
+              } // case 138
             default:
               {
                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2404,6 +2490,215 @@ public com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder
       return pullTargetBuilder_;
     }
 
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.tasks.v2beta2.HttpTarget,
+            com.google.cloud.tasks.v2beta2.HttpTarget.Builder,
+            com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder>
+        httpTargetBuilder_;
+    /**
+     *
+     *
+     * 
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return Whether the httpTarget field is set. + */ + @java.lang.Override + public boolean hasHttpTarget() { + return targetTypeCase_ == 17; + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return The httpTarget. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTarget getHttpTarget() { + if (httpTargetBuilder_ == null) { + if (targetTypeCase_ == 17) { + return (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } else { + if (targetTypeCase_ == 17) { + return httpTargetBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + public Builder setHttpTarget(com.google.cloud.tasks.v2beta2.HttpTarget value) { + if (httpTargetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetType_ = value; + onChanged(); + } else { + httpTargetBuilder_.setMessage(value); + } + targetTypeCase_ = 17; + return this; + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + public Builder setHttpTarget( + com.google.cloud.tasks.v2beta2.HttpTarget.Builder builderForValue) { + if (httpTargetBuilder_ == null) { + targetType_ = builderForValue.build(); + onChanged(); + } else { + httpTargetBuilder_.setMessage(builderForValue.build()); + } + targetTypeCase_ = 17; + return this; + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + public Builder mergeHttpTarget(com.google.cloud.tasks.v2beta2.HttpTarget value) { + if (httpTargetBuilder_ == null) { + if (targetTypeCase_ == 17 + && targetType_ != com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance()) { + targetType_ = + com.google.cloud.tasks.v2beta2.HttpTarget.newBuilder( + (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_) + .mergeFrom(value) + .buildPartial(); + } else { + targetType_ = value; + } + onChanged(); + } else { + if (targetTypeCase_ == 17) { + httpTargetBuilder_.mergeFrom(value); + } else { + httpTargetBuilder_.setMessage(value); + } + } + targetTypeCase_ = 17; + return this; + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + public Builder clearHttpTarget() { + if (httpTargetBuilder_ == null) { + if (targetTypeCase_ == 17) { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + } + } else { + if (targetTypeCase_ == 17) { + targetTypeCase_ = 0; + targetType_ = null; + } + httpTargetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + public com.google.cloud.tasks.v2beta2.HttpTarget.Builder getHttpTargetBuilder() { + return getHttpTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder getHttpTargetOrBuilder() { + if ((targetTypeCase_ == 17) && (httpTargetBuilder_ != null)) { + return httpTargetBuilder_.getMessageOrBuilder(); + } else { + if (targetTypeCase_ == 17) { + return (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + } + /** + * + * + *
+     * An http_target is used to override the target values for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget, + com.google.cloud.tasks.v2beta2.HttpTarget.Builder, + com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder> + getHttpTargetFieldBuilder() { + if (httpTargetBuilder_ == null) { + if (!(targetTypeCase_ == 17)) { + targetType_ = com.google.cloud.tasks.v2beta2.HttpTarget.getDefaultInstance(); + } + httpTargetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpTarget, + com.google.cloud.tasks.v2beta2.HttpTarget.Builder, + com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder>( + (com.google.cloud.tasks.v2beta2.HttpTarget) targetType_, + getParentForChildren(), + isClean()); + targetType_ = null; + } + targetTypeCase_ = 17; + onChanged(); + return httpTargetBuilder_; + } + private com.google.cloud.tasks.v2beta2.RateLimits rateLimits_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.tasks.v2beta2.RateLimits, @@ -2438,7 +2733,7 @@ public com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder * @return Whether the rateLimits field is set. */ public boolean hasRateLimits() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2510,7 +2805,7 @@ public Builder setRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) { } else { rateLimitsBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2546,7 +2841,7 @@ public Builder setRateLimits( } else { rateLimitsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2577,7 +2872,7 @@ public Builder setRateLimits( */ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) { if (rateLimitsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && rateLimits_ != null && rateLimits_ != com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance()) { getRateLimitsBuilder().mergeFrom(value); @@ -2587,7 +2882,7 @@ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) } else { rateLimitsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2617,7 +2912,7 @@ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; */ public Builder clearRateLimits() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); rateLimits_ = null; if (rateLimitsBuilder_ != null) { rateLimitsBuilder_.dispose(); @@ -2652,7 +2947,7 @@ public Builder clearRateLimits() { * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; */ public com.google.cloud.tasks.v2beta2.RateLimits.Builder getRateLimitsBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getRateLimitsFieldBuilder().getBuilder(); } @@ -2759,7 +3054,7 @@ public com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder getRateLimitsOrBuilder * @return Whether the retryConfig field is set. */ public boolean hasRetryConfig() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2817,7 +3112,7 @@ public Builder setRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value) } else { retryConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2846,7 +3141,7 @@ public Builder setRetryConfig( } else { retryConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2870,7 +3165,7 @@ public Builder setRetryConfig( */ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value) { if (retryConfigBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && retryConfig_ != null && retryConfig_ != com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance()) { getRetryConfigBuilder().mergeFrom(value); @@ -2880,7 +3175,7 @@ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value } else { retryConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2903,7 +3198,7 @@ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; */ public Builder clearRetryConfig() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); retryConfig_ = null; if (retryConfigBuilder_ != null) { retryConfigBuilder_.dispose(); @@ -2931,7 +3226,7 @@ public Builder clearRetryConfig() { * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; */ public com.google.cloud.tasks.v2beta2.RetryConfig.Builder getRetryConfigBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getRetryConfigFieldBuilder().getBuilder(); } @@ -3004,7 +3299,7 @@ public com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder getRetryConfigOrBuild *
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
      * uploading
@@ -3027,7 +3322,7 @@ public int getStateValue() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
      * uploading
@@ -3043,7 +3338,7 @@ public int getStateValue() {
      */
     public Builder setStateValue(int value) {
       state_ = value;
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3053,7 +3348,7 @@ public Builder setStateValue(int value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
      * uploading
@@ -3078,7 +3373,7 @@ public com.google.cloud.tasks.v2beta2.Queue.State getState() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
      * uploading
@@ -3096,7 +3391,7 @@ public Builder setState(com.google.cloud.tasks.v2beta2.Queue.State value) {
       if (value == null) {
         throw new NullPointerException();
       }
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       state_ = value.getNumber();
       onChanged();
       return this;
@@ -3107,7 +3402,7 @@ public Builder setState(com.google.cloud.tasks.v2beta2.Queue.State value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
      * uploading
@@ -3121,7 +3416,7 @@ public Builder setState(com.google.cloud.tasks.v2beta2.Queue.State value) {
      * @return This builder for chaining.
      */
     public Builder clearState() {
-      bitField0_ = (bitField0_ & ~0x00000020);
+      bitField0_ = (bitField0_ & ~0x00000040);
       state_ = 0;
       onChanged();
       return this;
@@ -3156,7 +3451,7 @@ public Builder clearState() {
      * @return Whether the purgeTime field is set.
      */
     public boolean hasPurgeTime() {
-      return ((bitField0_ & 0x00000040) != 0);
+      return ((bitField0_ & 0x00000080) != 0);
     }
     /**
      *
@@ -3216,7 +3511,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp value) {
       } else {
         purgeTimeBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3246,7 +3541,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValu
       } else {
         purgeTimeBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3272,7 +3567,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValu
      */
     public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
       if (purgeTimeBuilder_ == null) {
-        if (((bitField0_ & 0x00000040) != 0)
+        if (((bitField0_ & 0x00000080) != 0)
             && purgeTime_ != null
             && purgeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
           getPurgeTimeBuilder().mergeFrom(value);
@@ -3282,7 +3577,7 @@ public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
       } else {
         purgeTimeBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3307,7 +3602,7 @@ public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
      * .google.protobuf.Timestamp purge_time = 8;
      */
     public Builder clearPurgeTime() {
-      bitField0_ = (bitField0_ & ~0x00000040);
+      bitField0_ = (bitField0_ & ~0x00000080);
       purgeTime_ = null;
       if (purgeTimeBuilder_ != null) {
         purgeTimeBuilder_.dispose();
@@ -3337,7 +3632,7 @@ public Builder clearPurgeTime() {
      * .google.protobuf.Timestamp purge_time = 8;
      */
     public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() {
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return getPurgeTimeFieldBuilder().getBuilder();
     }
@@ -3434,7 +3729,7 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() {
      * @return Whether the taskTtl field is set.
      */
     public boolean hasTaskTtl() {
-      return ((bitField0_ & 0x00000080) != 0);
+      return ((bitField0_ & 0x00000100) != 0);
     }
     /**
      *
@@ -3494,7 +3789,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration value) {
       } else {
         taskTtlBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3524,7 +3819,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue)
       } else {
         taskTtlBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3550,7 +3845,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue)
      */
     public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
       if (taskTtlBuilder_ == null) {
-        if (((bitField0_ & 0x00000080) != 0)
+        if (((bitField0_ & 0x00000100) != 0)
             && taskTtl_ != null
             && taskTtl_ != com.google.protobuf.Duration.getDefaultInstance()) {
           getTaskTtlBuilder().mergeFrom(value);
@@ -3560,7 +3855,7 @@ public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
       } else {
         taskTtlBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3585,7 +3880,7 @@ public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
      * .google.protobuf.Duration task_ttl = 9;
      */
     public Builder clearTaskTtl() {
-      bitField0_ = (bitField0_ & ~0x00000080);
+      bitField0_ = (bitField0_ & ~0x00000100);
       taskTtl_ = null;
       if (taskTtlBuilder_ != null) {
         taskTtlBuilder_.dispose();
@@ -3615,7 +3910,7 @@ public Builder clearTaskTtl() {
      * .google.protobuf.Duration task_ttl = 9;
      */
     public com.google.protobuf.Duration.Builder getTaskTtlBuilder() {
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return getTaskTtlFieldBuilder().getBuilder();
     }
@@ -3710,7 +4005,7 @@ public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() {
      * @return Whether the tombstoneTtl field is set.
      */
     public boolean hasTombstoneTtl() {
-      return ((bitField0_ & 0x00000100) != 0);
+      return ((bitField0_ & 0x00000200) != 0);
     }
     /**
      *
@@ -3768,7 +4063,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration value) {
       } else {
         tombstoneTtlBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3796,7 +4091,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForVa
       } else {
         tombstoneTtlBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3820,7 +4115,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForVa
      */
     public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
       if (tombstoneTtlBuilder_ == null) {
-        if (((bitField0_ & 0x00000100) != 0)
+        if (((bitField0_ & 0x00000200) != 0)
             && tombstoneTtl_ != null
             && tombstoneTtl_ != com.google.protobuf.Duration.getDefaultInstance()) {
           getTombstoneTtlBuilder().mergeFrom(value);
@@ -3830,7 +4125,7 @@ public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
       } else {
         tombstoneTtlBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3853,7 +4148,7 @@ public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
      * .google.protobuf.Duration tombstone_ttl = 10;
      */
     public Builder clearTombstoneTtl() {
-      bitField0_ = (bitField0_ & ~0x00000100);
+      bitField0_ = (bitField0_ & ~0x00000200);
       tombstoneTtl_ = null;
       if (tombstoneTtlBuilder_ != null) {
         tombstoneTtlBuilder_.dispose();
@@ -3881,7 +4176,7 @@ public Builder clearTombstoneTtl() {
      * .google.protobuf.Duration tombstone_ttl = 10;
      */
     public com.google.protobuf.Duration.Builder getTombstoneTtlBuilder() {
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return getTombstoneTtlFieldBuilder().getBuilder();
     }
@@ -3969,7 +4264,7 @@ public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() {
      * @return Whether the stats field is set.
      */
     public boolean hasStats() {
-      return ((bitField0_ & 0x00000200) != 0);
+      return ((bitField0_ & 0x00000400) != 0);
     }
     /**
      *
@@ -4017,7 +4312,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta2.QueueStats value) {
       } else {
         statsBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4040,7 +4335,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta2.QueueStats.Builder builde
       } else {
         statsBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4059,7 +4354,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta2.QueueStats.Builder builde
      */
     public Builder mergeStats(com.google.cloud.tasks.v2beta2.QueueStats value) {
       if (statsBuilder_ == null) {
-        if (((bitField0_ & 0x00000200) != 0)
+        if (((bitField0_ & 0x00000400) != 0)
             && stats_ != null
             && stats_ != com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance()) {
           getStatsBuilder().mergeFrom(value);
@@ -4069,7 +4364,7 @@ public Builder mergeStats(com.google.cloud.tasks.v2beta2.QueueStats value) {
       } else {
         statsBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4087,7 +4382,7 @@ public Builder mergeStats(com.google.cloud.tasks.v2beta2.QueueStats value) {
      * 
      */
     public Builder clearStats() {
-      bitField0_ = (bitField0_ & ~0x00000200);
+      bitField0_ = (bitField0_ & ~0x00000400);
       stats_ = null;
       if (statsBuilder_ != null) {
         statsBuilder_.dispose();
@@ -4110,7 +4405,7 @@ public Builder clearStats() {
      * 
      */
     public com.google.cloud.tasks.v2beta2.QueueStats.Builder getStatsBuilder() {
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return getStatsFieldBuilder().getBuilder();
     }
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java
index 563e294f3cd2..e97168500109 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java
@@ -174,6 +174,41 @@ public interface QueueOrBuilder
    */
   com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder();
 
+  /**
+   *
+   *
+   * 
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return Whether the httpTarget field is set. + */ + boolean hasHttpTarget(); + /** + * + * + *
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * + * @return The httpTarget. + */ + com.google.cloud.tasks.v2beta2.HttpTarget getHttpTarget(); + /** + * + * + *
+   * An http_target is used to override the target values for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + */ + com.google.cloud.tasks.v2beta2.HttpTargetOrBuilder getHttpTargetOrBuilder(); + /** * * @@ -325,7 +360,7 @@ public interface QueueOrBuilder *
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
    * uploading
@@ -345,7 +380,7 @@ public interface QueueOrBuilder
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or
    * uploading
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java
index f71bfb983a84..df48580285c8 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java
@@ -57,44 +57,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "/field_behavior.proto\032\031google/api/resour"
           + "ce.proto\032\'google/cloud/tasks/v2beta2/tar"
           + "get.proto\032\036google/protobuf/duration.prot"
-          + "o\032\037google/protobuf/timestamp.proto\"\333\005\n\005Q"
+          + "o\032\037google/protobuf/timestamp.proto\"\232\006\n\005Q"
           + "ueue\022\014\n\004name\030\001 \001(\t\022Q\n\026app_engine_http_ta"
           + "rget\030\003 \001(\0132/.google.cloud.tasks.v2beta2."
           + "AppEngineHttpTargetH\000\022=\n\013pull_target\030\004 \001"
           + "(\0132&.google.cloud.tasks.v2beta2.PullTarg"
-          + "etH\000\022;\n\013rate_limits\030\005 \001(\0132&.google.cloud"
-          + ".tasks.v2beta2.RateLimits\022=\n\014retry_confi"
-          + "g\030\006 \001(\0132\'.google.cloud.tasks.v2beta2.Ret"
-          + "ryConfig\0226\n\005state\030\007 \001(\0162\'.google.cloud.t"
-          + "asks.v2beta2.Queue.State\022.\n\npurge_time\030\010"
-          + " \001(\0132\032.google.protobuf.Timestamp\022+\n\010task"
-          + "_ttl\030\t \001(\0132\031.google.protobuf.Duration\0220\n"
-          + "\rtombstone_ttl\030\n \001(\0132\031.google.protobuf.D"
-          + "uration\022;\n\005stats\030\020 \001(\0132&.google.cloud.ta"
-          + "sks.v2beta2.QueueStatsB\004\342A\001\003\"E\n\005State\022\025\n"
-          + "\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAU"
-          + "SED\020\002\022\014\n\010DISABLED\020\003:\\\352AY\n\037cloudtasks.goo"
-          + "gleapis.com/Queue\0226projects/{project}/lo"
-          + "cations/{location}/queues/{queue}B\r\n\013tar"
-          + "get_type\"k\n\nRateLimits\022\'\n\037max_tasks_disp"
-          + "atched_per_second\030\001 \001(\001\022\026\n\016max_burst_siz"
-          + "e\030\002 \001(\005\022\034\n\024max_concurrent_tasks\030\003 \001(\005\"\201\002"
-          + "\n\013RetryConfig\022\026\n\014max_attempts\030\001 \001(\005H\000\022\034\n"
-          + "\022unlimited_attempts\030\002 \001(\010H\000\0225\n\022max_retry"
-          + "_duration\030\003 \001(\0132\031.google.protobuf.Durati"
-          + "on\022.\n\013min_backoff\030\004 \001(\0132\031.google.protobu"
-          + "f.Duration\022.\n\013max_backoff\030\005 \001(\0132\031.google"
-          + ".protobuf.Duration\022\025\n\rmax_doublings\030\006 \001("
-          + "\005B\016\n\014num_attempts\"\355\001\n\nQueueStats\022\031\n\013task"
-          + "s_count\030\001 \001(\003B\004\342A\001\003\022G\n\035oldest_estimated_"
-          + "arrival_time\030\002 \001(\0132\032.google.protobuf.Tim"
-          + "estampB\004\342A\001\003\022(\n\032executed_last_minute_cou"
-          + "nt\030\003 \001(\003B\004\342A\001\003\022)\n\033concurrent_dispatches_"
-          + "count\030\004 \001(\003B\004\342A\001\003\022&\n\030effective_execution"
-          + "_rate\030\005 \001(\001B\004\342A\001\003Bs\n\036com.google.cloud.ta"
-          + "sks.v2beta2B\nQueueProtoP\001ZCcloud.google."
-          + "com/go/cloudtasks/apiv2beta2/cloudtasksp"
-          + "b;cloudtaskspbb\006proto3"
+          + "etH\000\022=\n\013http_target\030\021 \001(\0132&.google.cloud"
+          + ".tasks.v2beta2.HttpTargetH\000\022;\n\013rate_limi"
+          + "ts\030\005 \001(\0132&.google.cloud.tasks.v2beta2.Ra"
+          + "teLimits\022=\n\014retry_config\030\006 \001(\0132\'.google."
+          + "cloud.tasks.v2beta2.RetryConfig\0226\n\005state"
+          + "\030\007 \001(\0162\'.google.cloud.tasks.v2beta2.Queu"
+          + "e.State\022.\n\npurge_time\030\010 \001(\0132\032.google.pro"
+          + "tobuf.Timestamp\022+\n\010task_ttl\030\t \001(\0132\031.goog"
+          + "le.protobuf.Duration\0220\n\rtombstone_ttl\030\n "
+          + "\001(\0132\031.google.protobuf.Duration\022;\n\005stats\030"
+          + "\020 \001(\0132&.google.cloud.tasks.v2beta2.Queue"
+          + "StatsB\004\342A\001\003\"E\n\005State\022\025\n\021STATE_UNSPECIFIE"
+          + "D\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED"
+          + "\020\003:\\\352AY\n\037cloudtasks.googleapis.com/Queue"
+          + "\0226projects/{project}/locations/{location"
+          + "}/queues/{queue}B\r\n\013target_type\"k\n\nRateL"
+          + "imits\022\'\n\037max_tasks_dispatched_per_second"
+          + "\030\001 \001(\001\022\026\n\016max_burst_size\030\002 \001(\005\022\034\n\024max_co"
+          + "ncurrent_tasks\030\003 \001(\005\"\201\002\n\013RetryConfig\022\026\n\014"
+          + "max_attempts\030\001 \001(\005H\000\022\034\n\022unlimited_attemp"
+          + "ts\030\002 \001(\010H\000\0225\n\022max_retry_duration\030\003 \001(\0132\031"
+          + ".google.protobuf.Duration\022.\n\013min_backoff"
+          + "\030\004 \001(\0132\031.google.protobuf.Duration\022.\n\013max"
+          + "_backoff\030\005 \001(\0132\031.google.protobuf.Duratio"
+          + "n\022\025\n\rmax_doublings\030\006 \001(\005B\016\n\014num_attempts"
+          + "\"\355\001\n\nQueueStats\022\031\n\013tasks_count\030\001 \001(\003B\004\342A"
+          + "\001\003\022G\n\035oldest_estimated_arrival_time\030\002 \001("
+          + "\0132\032.google.protobuf.TimestampB\004\342A\001\003\022(\n\032e"
+          + "xecuted_last_minute_count\030\003 \001(\003B\004\342A\001\003\022)\n"
+          + "\033concurrent_dispatches_count\030\004 \001(\003B\004\342A\001\003"
+          + "\022&\n\030effective_execution_rate\030\005 \001(\001B\004\342A\001\003"
+          + "Bs\n\036com.google.cloud.tasks.v2beta2B\nQueu"
+          + "eProtoP\001ZCcloud.google.com/go/cloudtasks"
+          + "/apiv2beta2/cloudtaskspb;cloudtaskspbb\006p"
+          + "roto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -115,6 +117,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name",
               "AppEngineHttpTarget",
               "PullTarget",
+              "HttpTarget",
               "RateLimits",
               "RetryConfig",
               "State",
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java
index 5a6c80ba4ca0..abdae6d52ec3 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java
@@ -51,6 +51,46 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_HttpRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_PathOverride_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_QueryOverride_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_UriOverride_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_OAuthToken_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_cloud_tasks_v2beta2_OidcToken_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     return descriptor;
@@ -61,31 +101,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
   static {
     java.lang.String[] descriptorData = {
       "\n\'google/cloud/tasks/v2beta2/target.prot"
-          + "o\022\032google.cloud.tasks.v2beta2\"\014\n\nPullTar"
-          + "get\"+\n\013PullMessage\022\017\n\007payload\030\001 \001(\014\022\013\n\003t"
-          + "ag\030\002 \001(\t\"h\n\023AppEngineHttpTarget\022Q\n\033app_e"
-          + "ngine_routing_override\030\001 \001(\0132,.google.cl"
-          + "oud.tasks.v2beta2.AppEngineRouting\"\304\002\n\024A"
-          + "ppEngineHttpRequest\022;\n\013http_method\030\001 \001(\016"
-          + "2&.google.cloud.tasks.v2beta2.HttpMethod"
-          + "\022H\n\022app_engine_routing\030\002 \001(\0132,.google.cl"
-          + "oud.tasks.v2beta2.AppEngineRouting\022\024\n\014re"
-          + "lative_url\030\003 \001(\t\022N\n\007headers\030\004 \003(\0132=.goog"
-          + "le.cloud.tasks.v2beta2.AppEngineHttpRequ"
-          + "est.HeadersEntry\022\017\n\007payload\030\005 \001(\014\032.\n\014Hea"
-          + "dersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
-          + "\001\"T\n\020AppEngineRouting\022\017\n\007service\030\001 \001(\t\022\017"
-          + "\n\007version\030\002 \001(\t\022\020\n\010instance\030\003 \001(\t\022\014\n\004hos"
-          + "t\030\004 \001(\t*[\n\nHttpMethod\022\033\n\027HTTP_METHOD_UNS"
-          + "PECIFIED\020\000\022\010\n\004POST\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022"
-          + "\007\n\003PUT\020\004\022\n\n\006DELETE\020\005Bt\n\036com.google.cloud"
-          + ".tasks.v2beta2B\013TargetProtoP\001ZCcloud.goo"
-          + "gle.com/go/cloudtasks/apiv2beta2/cloudta"
-          + "skspb;cloudtaskspbb\006proto3"
+          + "o\022\032google.cloud.tasks.v2beta2\032\037google/ap"
+          + "i/field_behavior.proto\"\014\n\nPullTarget\"+\n\013"
+          + "PullMessage\022\017\n\007payload\030\001 \001(\014\022\013\n\003tag\030\002 \001("
+          + "\t\"h\n\023AppEngineHttpTarget\022Q\n\033app_engine_r"
+          + "outing_override\030\001 \001(\0132,.google.cloud.tas"
+          + "ks.v2beta2.AppEngineRouting\"\304\002\n\024AppEngin"
+          + "eHttpRequest\022;\n\013http_method\030\001 \001(\0162&.goog"
+          + "le.cloud.tasks.v2beta2.HttpMethod\022H\n\022app"
+          + "_engine_routing\030\002 \001(\0132,.google.cloud.tas"
+          + "ks.v2beta2.AppEngineRouting\022\024\n\014relative_"
+          + "url\030\003 \001(\t\022N\n\007headers\030\004 \003(\0132=.google.clou"
+          + "d.tasks.v2beta2.AppEngineHttpRequest.Hea"
+          + "dersEntry\022\017\n\007payload\030\005 \001(\014\032.\n\014HeadersEnt"
+          + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020Ap"
+          + "pEngineRouting\022\017\n\007service\030\001 \001(\t\022\017\n\007versi"
+          + "on\030\002 \001(\t\022\020\n\010instance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t"
+          + "\"\366\002\n\013HttpRequest\022\021\n\003url\030\001 \001(\tB\004\342A\001\002\022;\n\013h"
+          + "ttp_method\030\002 \001(\0162&.google.cloud.tasks.v2"
+          + "beta2.HttpMethod\022E\n\007headers\030\003 \003(\01324.goog"
+          + "le.cloud.tasks.v2beta2.HttpRequest.Heade"
+          + "rsEntry\022\014\n\004body\030\004 \001(\014\022=\n\013oauth_token\030\005 \001"
+          + "(\0132&.google.cloud.tasks.v2beta2.OAuthTok"
+          + "enH\000\022;\n\noidc_token\030\006 \001(\0132%.google.cloud."
+          + "tasks.v2beta2.OidcTokenH\000\032.\n\014HeadersEntr"
+          + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\026\n\024aut"
+          + "horization_header\"\034\n\014PathOverride\022\014\n\004pat"
+          + "h\030\001 \001(\t\"%\n\rQueryOverride\022\024\n\014query_params"
+          + "\030\001 \001(\t\"\227\004\n\013UriOverride\022C\n\006scheme\030\001 \001(\0162."
+          + ".google.cloud.tasks.v2beta2.UriOverride."
+          + "SchemeH\000\210\001\001\022\021\n\004host\030\002 \001(\tH\001\210\001\001\022\021\n\004port\030\003"
+          + " \001(\003H\002\210\001\001\022?\n\rpath_override\030\004 \001(\0132(.googl"
+          + "e.cloud.tasks.v2beta2.PathOverride\022A\n\016qu"
+          + "ery_override\030\005 \001(\0132).google.cloud.tasks."
+          + "v2beta2.QueryOverride\022a\n\031uri_override_en"
+          + "force_mode\030\006 \001(\0162>.google.cloud.tasks.v2"
+          + "beta2.UriOverride.UriOverrideEnforceMode"
+          + "\"5\n\006Scheme\022\026\n\022SCHEME_UNSPECIFIED\020\000\022\010\n\004HT"
+          + "TP\020\001\022\t\n\005HTTPS\020\002\"b\n\026UriOverrideEnforceMod"
+          + "e\022)\n%URI_OVERRIDE_ENFORCE_MODE_UNSPECIFI"
+          + "ED\020\000\022\021\n\rIF_NOT_EXISTS\020\001\022\n\n\006ALWAYS\020\002B\t\n\007_"
+          + "schemeB\007\n\005_hostB\007\n\005_port\"\344\003\n\nHttpTarget\022"
+          + "=\n\014uri_override\030\001 \001(\0132\'.google.cloud.tas"
+          + "ks.v2beta2.UriOverride\022;\n\013http_method\030\002 "
+          + "\001(\0162&.google.cloud.tasks.v2beta2.HttpMet"
+          + "hod\022O\n\020header_overrides\030\003 \003(\01325.google.c"
+          + "loud.tasks.v2beta2.HttpTarget.HeaderOver"
+          + "ride\022=\n\013oauth_token\030\005 \001(\0132&.google.cloud"
+          + ".tasks.v2beta2.OAuthTokenH\000\022;\n\noidc_toke"
+          + "n\030\006 \001(\0132%.google.cloud.tasks.v2beta2.Oid"
+          + "cTokenH\000\032$\n\006Header\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
+          + "\030\002 \001(\t\032O\n\016HeaderOverride\022=\n\006header\030\001 \001(\013"
+          + "2-.google.cloud.tasks.v2beta2.HttpTarget"
+          + ".HeaderB\026\n\024authorization_header\":\n\nOAuth"
+          + "Token\022\035\n\025service_account_email\030\001 \001(\t\022\r\n\005"
+          + "scope\030\002 \001(\t\"<\n\tOidcToken\022\035\n\025service_acco"
+          + "unt_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t*s\n\nHtt"
+          + "pMethod\022\033\n\027HTTP_METHOD_UNSPECIFIED\020\000\022\010\n\004"
+          + "POST\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003PUT\020\004\022\n\n\006DE"
+          + "LETE\020\005\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020\007Bt\n\036com.go"
+          + "ogle.cloud.tasks.v2beta2B\013TargetProtoP\001Z"
+          + "Ccloud.google.com/go/cloudtasks/apiv2bet"
+          + "a2/cloudtaskspb;cloudtaskspbb\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
-            descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+            descriptorData,
+            new com.google.protobuf.Descriptors.FileDescriptor[] {
+              com.google.api.FieldBehaviorProto.getDescriptor(),
+            });
     internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor =
         getDescriptor().getMessageTypes().get(0);
     internal_static_google_cloud_tasks_v2beta2_PullTarget_fieldAccessorTable =
@@ -134,6 +218,111 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "Service", "Version", "Instance", "Host",
             });
+    internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor =
+        getDescriptor().getMessageTypes().get(5);
+    internal_static_google_cloud_tasks_v2beta2_HttpRequest_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor,
+            new java.lang.String[] {
+              "Url",
+              "HttpMethod",
+              "Headers",
+              "Body",
+              "OauthToken",
+              "OidcToken",
+              "AuthorizationHeader",
+            });
+    internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_descriptor =
+        internal_static_google_cloud_tasks_v2beta2_HttpRequest_descriptor.getNestedTypes().get(0);
+    internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_HttpRequest_HeadersEntry_descriptor,
+            new java.lang.String[] {
+              "Key", "Value",
+            });
+    internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor =
+        getDescriptor().getMessageTypes().get(6);
+    internal_static_google_cloud_tasks_v2beta2_PathOverride_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_PathOverride_descriptor,
+            new java.lang.String[] {
+              "Path",
+            });
+    internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor =
+        getDescriptor().getMessageTypes().get(7);
+    internal_static_google_cloud_tasks_v2beta2_QueryOverride_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_QueryOverride_descriptor,
+            new java.lang.String[] {
+              "QueryParams",
+            });
+    internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor =
+        getDescriptor().getMessageTypes().get(8);
+    internal_static_google_cloud_tasks_v2beta2_UriOverride_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor,
+            new java.lang.String[] {
+              "Scheme",
+              "Host",
+              "Port",
+              "PathOverride",
+              "QueryOverride",
+              "UriOverrideEnforceMode",
+              "Scheme",
+              "Host",
+              "Port",
+            });
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor =
+        getDescriptor().getMessageTypes().get(9);
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor,
+            new java.lang.String[] {
+              "UriOverride",
+              "HttpMethod",
+              "HeaderOverrides",
+              "OauthToken",
+              "OidcToken",
+              "AuthorizationHeader",
+            });
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor =
+        internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor.getNestedTypes().get(0);
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_HttpTarget_Header_descriptor,
+            new java.lang.String[] {
+              "Key", "Value",
+            });
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor =
+        internal_static_google_cloud_tasks_v2beta2_HttpTarget_descriptor.getNestedTypes().get(1);
+    internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_HttpTarget_HeaderOverride_descriptor,
+            new java.lang.String[] {
+              "Header",
+            });
+    internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor =
+        getDescriptor().getMessageTypes().get(10);
+    internal_static_google_cloud_tasks_v2beta2_OAuthToken_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_OAuthToken_descriptor,
+            new java.lang.String[] {
+              "ServiceAccountEmail", "Scope",
+            });
+    internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor =
+        getDescriptor().getMessageTypes().get(11);
+    internal_static_google_cloud_tasks_v2beta2_OidcToken_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_cloud_tasks_v2beta2_OidcToken_descriptor,
+            new java.lang.String[] {
+              "ServiceAccountEmail", "Audience",
+            });
+    com.google.protobuf.ExtensionRegistry registry =
+        com.google.protobuf.ExtensionRegistry.newInstance();
+    registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+    com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+        descriptor, registry);
+    com.google.api.FieldBehaviorProto.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java
index 456a2c2347bf..1ebf83b08a7b 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java
@@ -268,6 +268,7 @@ public enum PayloadTypeCase
           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
     APP_ENGINE_HTTP_REQUEST(3),
     PULL_MESSAGE(4),
+    HTTP_REQUEST(13),
     PAYLOADTYPE_NOT_SET(0);
     private final int value;
 
@@ -290,6 +291,8 @@ public static PayloadTypeCase forNumber(int value) {
           return APP_ENGINE_HTTP_REQUEST;
         case 4:
           return PULL_MESSAGE;
+        case 13:
+          return HTTP_REQUEST;
         case 0:
           return PAYLOADTYPE_NOT_SET;
         default:
@@ -539,6 +542,66 @@ public com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuild
     return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance();
   }
 
+  public static final int HTTP_REQUEST_FIELD_NUMBER = 13;
+  /**
+   *
+   *
+   * 
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return Whether the httpRequest field is set. + */ + @java.lang.Override + public boolean hasHttpRequest() { + return payloadTypeCase_ == 13; + } + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return The httpRequest. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest getHttpRequest() { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder getHttpRequestOrBuilder() { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + public static final int SCHEDULE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp scheduleTime_; /** @@ -793,6 +856,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (view_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(8, view_); } + if (payloadTypeCase_ == 13) { + output.writeMessage(13, (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_); + } getUnknownFields().writeTo(output); } @@ -827,6 +893,11 @@ public int getSerializedSize() { if (view_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, view_); } + if (payloadTypeCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -864,6 +935,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getPullMessage().equals(other.getPullMessage())) return false; break; + case 13: + if (!getHttpRequest().equals(other.getHttpRequest())) return false; + break; case 0: default: } @@ -903,6 +977,10 @@ public int hashCode() { hash = (37 * hash) + PULL_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getPullMessage().hashCode(); break; + case 13: + hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getHttpRequest().hashCode(); + break; case 0: default: } @@ -1051,6 +1129,9 @@ public Builder clear() { if (pullMessageBuilder_ != null) { pullMessageBuilder_.clear(); } + if (httpRequestBuilder_ != null) { + httpRequestBuilder_.clear(); + } scheduleTime_ = null; if (scheduleTimeBuilder_ != null) { scheduleTimeBuilder_.dispose(); @@ -1108,17 +1189,17 @@ private void buildPartial0(com.google.cloud.tasks.v2beta2.Task result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.scheduleTime_ = scheduleTimeBuilder_ == null ? scheduleTime_ : scheduleTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.view_ = view_; } } @@ -1132,6 +1213,9 @@ private void buildPartialOneofs(com.google.cloud.tasks.v2beta2.Task result) { if (payloadTypeCase_ == 4 && pullMessageBuilder_ != null) { result.payloadType_ = pullMessageBuilder_.build(); } + if (payloadTypeCase_ == 13 && httpRequestBuilder_ != null) { + result.payloadType_ = httpRequestBuilder_.build(); + } } @java.lang.Override @@ -1207,6 +1291,11 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta2.Task other) { mergePullMessage(other.getPullMessage()); break; } + case HTTP_REQUEST: + { + mergeHttpRequest(other.getHttpRequest()); + break; + } case PAYLOADTYPE_NOT_SET: { break; @@ -1260,27 +1349,33 @@ public Builder mergeFrom( case 42: { input.readMessage(getScheduleTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 58 case 64: { view_ = input.readEnum(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 64 + case 106: + { + input.readMessage(getHttpRequestFieldBuilder().getBuilder(), extensionRegistry); + payloadTypeCase_ = 13; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2060,6 +2155,242 @@ public com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuild return pullMessageBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpRequest, + com.google.cloud.tasks.v2beta2.HttpRequest.Builder, + com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder> + httpRequestBuilder_; + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return Whether the httpRequest field is set. + */ + @java.lang.Override + public boolean hasHttpRequest() { + return payloadTypeCase_ == 13; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return The httpRequest. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequest getHttpRequest() { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } else { + if (payloadTypeCase_ == 13) { + return httpRequestBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + public Builder setHttpRequest(com.google.cloud.tasks.v2beta2.HttpRequest value) { + if (httpRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payloadType_ = value; + onChanged(); + } else { + httpRequestBuilder_.setMessage(value); + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + public Builder setHttpRequest( + com.google.cloud.tasks.v2beta2.HttpRequest.Builder builderForValue) { + if (httpRequestBuilder_ == null) { + payloadType_ = builderForValue.build(); + onChanged(); + } else { + httpRequestBuilder_.setMessage(builderForValue.build()); + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + public Builder mergeHttpRequest(com.google.cloud.tasks.v2beta2.HttpRequest value) { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 13 + && payloadType_ != com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance()) { + payloadType_ = + com.google.cloud.tasks.v2beta2.HttpRequest.newBuilder( + (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_) + .mergeFrom(value) + .buildPartial(); + } else { + payloadType_ = value; + } + onChanged(); + } else { + if (payloadTypeCase_ == 13) { + httpRequestBuilder_.mergeFrom(value); + } else { + httpRequestBuilder_.setMessage(value); + } + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + public Builder clearHttpRequest() { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 13) { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + } + } else { + if (payloadTypeCase_ == 13) { + payloadTypeCase_ = 0; + payloadType_ = null; + } + httpRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + public com.google.cloud.tasks.v2beta2.HttpRequest.Builder getHttpRequestBuilder() { + return getHttpRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder getHttpRequestOrBuilder() { + if ((payloadTypeCase_ == 13) && (httpRequestBuilder_ != null)) { + return httpRequestBuilder_.getMessageOrBuilder(); + } else { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     *
+     * An HTTP task is a task that has
+     * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpRequest, + com.google.cloud.tasks.v2beta2.HttpRequest.Builder, + com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder> + getHttpRequestFieldBuilder() { + if (httpRequestBuilder_ == null) { + if (!(payloadTypeCase_ == 13)) { + payloadType_ = com.google.cloud.tasks.v2beta2.HttpRequest.getDefaultInstance(); + } + httpRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.HttpRequest, + com.google.cloud.tasks.v2beta2.HttpRequest.Builder, + com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder>( + (com.google.cloud.tasks.v2beta2.HttpRequest) payloadType_, + getParentForChildren(), + isClean()); + payloadType_ = null; + } + payloadTypeCase_ = 13; + onChanged(); + return httpRequestBuilder_; + } + private com.google.protobuf.Timestamp scheduleTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -2088,7 +2419,7 @@ public com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuild * @return Whether the scheduleTime field is set. */ public boolean hasScheduleTime() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2148,7 +2479,7 @@ public Builder setScheduleTime(com.google.protobuf.Timestamp value) { } else { scheduleTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2177,7 +2508,7 @@ public Builder setScheduleTime(com.google.protobuf.Timestamp.Builder builderForV } else { scheduleTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2202,7 +2533,7 @@ public Builder setScheduleTime(com.google.protobuf.Timestamp.Builder builderForV */ public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { if (scheduleTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && scheduleTime_ != null && scheduleTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getScheduleTimeBuilder().mergeFrom(value); @@ -2212,7 +2543,7 @@ public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { } else { scheduleTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2236,7 +2567,7 @@ public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp schedule_time = 5; */ public Builder clearScheduleTime() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); scheduleTime_ = null; if (scheduleTimeBuilder_ != null) { scheduleTimeBuilder_.dispose(); @@ -2265,7 +2596,7 @@ public Builder clearScheduleTime() { * .google.protobuf.Timestamp schedule_time = 5; */ public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getScheduleTimeFieldBuilder().getBuilder(); } @@ -2353,7 +2684,7 @@ public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -2397,7 +2728,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2418,7 +2749,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2435,7 +2766,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -2445,7 +2776,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2461,7 +2792,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp create_time = 6; */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -2482,7 +2813,7 @@ public Builder clearCreateTime() { * .google.protobuf.Timestamp create_time = 6; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -2552,7 +2883,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the status field is set. */ public boolean hasStatus() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2592,7 +2923,7 @@ public Builder setStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { } else { statusBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2611,7 +2942,7 @@ public Builder setStatus(com.google.cloud.tasks.v2beta2.TaskStatus.Builder build } else { statusBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2626,7 +2957,7 @@ public Builder setStatus(com.google.cloud.tasks.v2beta2.TaskStatus.Builder build */ public Builder mergeStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { if (statusBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && status_ != null && status_ != com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance()) { getStatusBuilder().mergeFrom(value); @@ -2636,7 +2967,7 @@ public Builder mergeStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { } else { statusBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2650,7 +2981,7 @@ public Builder mergeStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { * .google.cloud.tasks.v2beta2.TaskStatus status = 7; */ public Builder clearStatus() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); status_ = null; if (statusBuilder_ != null) { statusBuilder_.dispose(); @@ -2669,7 +3000,7 @@ public Builder clearStatus() { * .google.cloud.tasks.v2beta2.TaskStatus status = 7; */ public com.google.cloud.tasks.v2beta2.TaskStatus.Builder getStatusBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getStatusFieldBuilder().getBuilder(); } @@ -2749,7 +3080,7 @@ public int getViewValue() { */ public Builder setViewValue(int value) { view_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2788,7 +3119,7 @@ public Builder setView(com.google.cloud.tasks.v2beta2.Task.View value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; view_ = value.getNumber(); onChanged(); return this; @@ -2806,7 +3137,7 @@ public Builder setView(com.google.cloud.tasks.v2beta2.Task.View value) { * @return This builder for chaining. */ public Builder clearView() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); view_ = 0; onChanged(); return this; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java index 10566e021cea..c230015d1bbd 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java @@ -197,6 +197,50 @@ public interface TaskOrBuilder */ com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuilder(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return Whether the httpRequest field is set. + */ + boolean hasHttpRequest(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * + * @return The httpRequest. + */ + com.google.cloud.tasks.v2beta2.HttpRequest getHttpRequest(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   *
+   * An HTTP task is a task that has
+   * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + */ + com.google.cloud.tasks.v2beta2.HttpRequestOrBuilder getHttpRequestOrBuilder(); + /** * * diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java index 4c58155a1c7e..2bd8e9aa0456 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java @@ -52,35 +52,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032google.cloud.tasks.v2beta2\032\031google/api/" + "resource.proto\032\'google/cloud/tasks/v2bet" + "a2/target.proto\032\037google/protobuf/timesta" - + "mp.proto\032\027google/rpc/status.proto\"\250\004\n\004Ta" + + "mp.proto\032\027google/rpc/status.proto\"\351\004\n\004Ta" + "sk\022\014\n\004name\030\001 \001(\t\022S\n\027app_engine_http_requ" + "est\030\003 \001(\01320.google.cloud.tasks.v2beta2.A" + "ppEngineHttpRequestH\000\022?\n\014pull_message\030\004 " + "\001(\0132\'.google.cloud.tasks.v2beta2.PullMes" - + "sageH\000\0221\n\rschedule_time\030\005 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022/\n\013create_time\030\006 \001(\0132\032" - + ".google.protobuf.Timestamp\0226\n\006status\030\007 \001" - + "(\0132&.google.cloud.tasks.v2beta2.TaskStat" - + "us\0223\n\004view\030\010 \001(\0162%.google.cloud.tasks.v2" - + "beta2.Task.View\"1\n\004View\022\024\n\020VIEW_UNSPECIF" - + "IED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002:h\352Ae\n\036cloudta" - + "sks.googleapis.com/Task\022Cprojects/{proje" - + "ct}/locations/{location}/queues/{queue}/" - + "tasks/{task}B\016\n\014payload_type\"\335\001\n\nTaskSta" - + "tus\022\036\n\026attempt_dispatch_count\030\001 \001(\005\022\036\n\026a" - + "ttempt_response_count\030\002 \001(\005\022G\n\024first_att" - + "empt_status\030\003 \001(\0132).google.cloud.tasks.v" - + "2beta2.AttemptStatus\022F\n\023last_attempt_sta" - + "tus\030\004 \001(\0132).google.cloud.tasks.v2beta2.A" - + "ttemptStatus\"\325\001\n\rAttemptStatus\0221\n\rschedu" - + "le_time\030\001 \001(\0132\032.google.protobuf.Timestam" - + "p\0221\n\rdispatch_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\0221\n\rresponse_time\030\003 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022+\n\017response_stat" - + "us\030\004 \001(\0132\022.google.rpc.StatusBr\n\036com.goog" - + "le.cloud.tasks.v2beta2B\tTaskProtoP\001ZCclo" - + "ud.google.com/go/cloudtasks/apiv2beta2/c" - + "loudtaskspb;cloudtaskspbb\006proto3" + + "sageH\000\022?\n\014http_request\030\r \001(\0132\'.google.cl" + + "oud.tasks.v2beta2.HttpRequestH\000\0221\n\rsched" + + "ule_time\030\005 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013create_time\030\006 \001(\0132\032.google.protobu" + + "f.Timestamp\0226\n\006status\030\007 \001(\0132&.google.clo" + + "ud.tasks.v2beta2.TaskStatus\0223\n\004view\030\010 \001(" + + "\0162%.google.cloud.tasks.v2beta2.Task.View" + + "\"1\n\004View\022\024\n\020VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020" + + "\001\022\010\n\004FULL\020\002:h\352Ae\n\036cloudtasks.googleapis." + + "com/Task\022Cprojects/{project}/locations/{" + + "location}/queues/{queue}/tasks/{task}B\016\n" + + "\014payload_type\"\335\001\n\nTaskStatus\022\036\n\026attempt_" + + "dispatch_count\030\001 \001(\005\022\036\n\026attempt_response" + + "_count\030\002 \001(\005\022G\n\024first_attempt_status\030\003 \001" + + "(\0132).google.cloud.tasks.v2beta2.AttemptS" + + "tatus\022F\n\023last_attempt_status\030\004 \001(\0132).goo" + + "gle.cloud.tasks.v2beta2.AttemptStatus\"\325\001" + + "\n\rAttemptStatus\0221\n\rschedule_time\030\001 \001(\0132\032" + + ".google.protobuf.Timestamp\0221\n\rdispatch_t" + + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\0221\n" + + "\rresponse_time\030\003 \001(\0132\032.google.protobuf.T" + + "imestamp\022+\n\017response_status\030\004 \001(\0132\022.goog" + + "le.rpc.StatusBr\n\036com.google.cloud.tasks." + + "v2beta2B\tTaskProtoP\001ZCcloud.google.com/g" + + "o/cloudtasks/apiv2beta2/cloudtaskspb;clo" + + "udtaskspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -100,6 +102,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "AppEngineHttpRequest", "PullMessage", + "HttpRequest", "ScheduleTime", "CreateTime", "Status", diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequest.java new file mode 100644 index 000000000000..1e25bdf6744a --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequest.java @@ -0,0 +1,909 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Request message for
+ * [UploadQueueYaml][google.cloud.tasks.v2beta2.CloudTasks.UploadQueueYaml].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UploadQueueYamlRequest} + */ +public final class UploadQueueYamlRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.UploadQueueYamlRequest) + UploadQueueYamlRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadQueueYamlRequest.newBuilder() to construct. + private UploadQueueYamlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UploadQueueYamlRequest() { + appId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UploadQueueYamlRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.class, + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.Builder.class); + } + + private int bitField0_; + public static final int APP_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object appId_ = ""; + /** + * + * + *
+   * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+   * usage of App ID, it does not include a region prefix. Rather, the App ID
+   * represents the Project ID against which to make the request.
+   * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + @java.lang.Override + public java.lang.String getAppId() { + java.lang.Object ref = appId_; + 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(); + appId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+   * usage of App ID, it does not include a region prefix. Rather, the App ID
+   * represents the Project ID against which to make the request.
+   * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for appId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppIdBytes() { + java.lang.Object ref = appId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_BODY_FIELD_NUMBER = 2; + private com.google.api.HttpBody httpBody_; + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + @java.lang.Override + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + @java.lang.Override + public com.google.api.HttpBody getHttpBody() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + @java.lang.Override + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getHttpBody()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest other = + (com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest) obj; + + if (!getAppId().equals(other.getAppId())) return false; + if (hasHttpBody() != other.hasHttpBody()) return false; + if (hasHttpBody()) { + if (!getHttpBody().equals(other.getHttpBody())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APP_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppId().hashCode(); + if (hasHttpBody()) { + hash = (37 * hash) + HTTP_BODY_FIELD_NUMBER; + hash = (53 * hash) + getHttpBody().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [UploadQueueYaml][google.cloud.tasks.v2beta2.CloudTasks.UploadQueueYaml].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UploadQueueYamlRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.UploadQueueYamlRequest) + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.class, + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHttpBodyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appId_ = ""; + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta2_UploadQueueYamlRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest build() { + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest buildPartial() { + com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest result = + new com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appId_ = appId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest other) { + if (other == com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest.getDefaultInstance()) + return this; + if (!other.getAppId().isEmpty()) { + appId_ = other.appId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasHttpBody()) { + mergeHttpBody(other.getHttpBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + appId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getHttpBodyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object appId_ = ""; + /** + * + * + *
+     * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+     * usage of App ID, it does not include a region prefix. Rather, the App ID
+     * represents the Project ID against which to make the request.
+     * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + public java.lang.String getAppId() { + java.lang.Object ref = appId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+     * usage of App ID, it does not include a region prefix. Rather, the App ID
+     * represents the Project ID against which to make the request.
+     * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for appId. + */ + public com.google.protobuf.ByteString getAppIdBytes() { + java.lang.Object ref = appId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+     * usage of App ID, it does not include a region prefix. Rather, the App ID
+     * represents the Project ID against which to make the request.
+     * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The appId to set. + * @return This builder for chaining. + */ + public Builder setAppId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+     * usage of App ID, it does not include a region prefix. Rather, the App ID
+     * represents the Project ID against which to make the request.
+     * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAppId() { + appId_ = getDefaultInstance().getAppId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+     * usage of App ID, it does not include a region prefix. Rather, the App ID
+     * represents the Project ID against which to make the request.
+     * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for appId to set. + * @return This builder for chaining. + */ + public Builder setAppIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.api.HttpBody httpBody_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + httpBodyBuilder_; + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + public com.google.api.HttpBody getHttpBody() { + if (httpBodyBuilder_ == null) { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } else { + return httpBodyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public Builder setHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + httpBody_ = value; + } else { + httpBodyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public Builder setHttpBody(com.google.api.HttpBody.Builder builderForValue) { + if (httpBodyBuilder_ == null) { + httpBody_ = builderForValue.build(); + } else { + httpBodyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public Builder mergeHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && httpBody_ != null + && httpBody_ != com.google.api.HttpBody.getDefaultInstance()) { + getHttpBodyBuilder().mergeFrom(value); + } else { + httpBody_ = value; + } + } else { + httpBodyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public Builder clearHttpBody() { + bitField0_ = (bitField0_ & ~0x00000002); + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public com.google.api.HttpBody.Builder getHttpBodyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHttpBodyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + if (httpBodyBuilder_ != null) { + return httpBodyBuilder_.getMessageOrBuilder(); + } else { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + } + /** + * + * + *
+     * The http body contains the queue.yaml file which used to update queue lists
+     * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + getHttpBodyFieldBuilder() { + if (httpBodyBuilder_ == null) { + httpBodyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder>(getHttpBody(), getParentForChildren(), isClean()); + httpBody_ = null; + } + return httpBodyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.UploadQueueYamlRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.UploadQueueYamlRequest) + private static final com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest(); + } + + public static com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadQueueYamlRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequestOrBuilder.java new file mode 100644 index 000000000000..6ed57cb6cc68 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UploadQueueYamlRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface UploadQueueYamlRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.UploadQueueYamlRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+   * usage of App ID, it does not include a region prefix. Rather, the App ID
+   * represents the Project ID against which to make the request.
+   * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The appId. + */ + java.lang.String getAppId(); + /** + * + * + *
+   * Required. The App ID is supplied as an HTTP parameter. Unlike internal
+   * usage of App ID, it does not include a region prefix. Rather, the App ID
+   * represents the Project ID against which to make the request.
+   * 
+ * + * string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for appId. + */ + com.google.protobuf.ByteString getAppIdBytes(); + + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + boolean hasHttpBody(); + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + com.google.api.HttpBody getHttpBody(); + /** + * + * + *
+   * The http body contains the queue.yaml file which used to update queue lists
+   * 
+ * + * optional .google.api.HttpBody http_body = 2; + */ + com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverride.java new file mode 100644 index 000000000000..e661499cf8db --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverride.java @@ -0,0 +1,2213 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Uri Override.
+ *
+ * When specified, all the HTTP tasks inside the queue will be partially or
+ * fully overridden depending on the configured values.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UriOverride} + */ +public final class UriOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.UriOverride) + UriOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use UriOverride.newBuilder() to construct. + private UriOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UriOverride() { + scheme_ = 0; + host_ = ""; + uriOverrideEnforceMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UriOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_UriOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UriOverride.class, + com.google.cloud.tasks.v2beta2.UriOverride.Builder.class); + } + + /** + * + * + *
+   * The Scheme for an HTTP request. By default, it is HTTPS.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta2.UriOverride.Scheme} + */ + public enum Scheme implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Scheme unspecified. Defaults to HTTPS.
+     * 
+ * + * SCHEME_UNSPECIFIED = 0; + */ + SCHEME_UNSPECIFIED(0), + /** + * + * + *
+     * Convert the scheme to HTTP, e.g., https://www.google.ca will change to
+     * http://www.google.ca.
+     * 
+ * + * HTTP = 1; + */ + HTTP(1), + /** + * + * + *
+     * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to
+     * https://www.google.ca.
+     * 
+ * + * HTTPS = 2; + */ + HTTPS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Scheme unspecified. Defaults to HTTPS.
+     * 
+ * + * SCHEME_UNSPECIFIED = 0; + */ + public static final int SCHEME_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Convert the scheme to HTTP, e.g., https://www.google.ca will change to
+     * http://www.google.ca.
+     * 
+ * + * HTTP = 1; + */ + public static final int HTTP_VALUE = 1; + /** + * + * + *
+     * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to
+     * https://www.google.ca.
+     * 
+ * + * HTTPS = 2; + */ + public static final int HTTPS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scheme valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scheme forNumber(int value) { + switch (value) { + case 0: + return SCHEME_UNSPECIFIED; + case 1: + return HTTP; + case 2: + return HTTPS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scheme findValueByNumber(int number) { + return Scheme.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.UriOverride.getDescriptor().getEnumTypes().get(0); + } + + private static final Scheme[] VALUES = values(); + + public static Scheme valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scheme(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta2.UriOverride.Scheme) + } + + /** + * + * + *
+   * UriOverrideEnforceMode mode is to define enforcing mode for the override
+   * modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode} + */ + public enum UriOverrideEnforceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * OverrideMode Unspecified. Defaults to ALWAYS.
+     * 
+ * + * URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * In the IF_NOT_EXISTS mode, queue-level configuration is only
+     * applied where task-level configuration does not exist.
+     * 
+ * + * IF_NOT_EXISTS = 1; + */ + IF_NOT_EXISTS(1), + /** + * + * + *
+     * In the ALWAYS mode, queue-level configuration overrides all
+     * task-level configuration
+     * 
+ * + * ALWAYS = 2; + */ + ALWAYS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * OverrideMode Unspecified. Defaults to ALWAYS.
+     * 
+ * + * URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + public static final int URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * In the IF_NOT_EXISTS mode, queue-level configuration is only
+     * applied where task-level configuration does not exist.
+     * 
+ * + * IF_NOT_EXISTS = 1; + */ + public static final int IF_NOT_EXISTS_VALUE = 1; + /** + * + * + *
+     * In the ALWAYS mode, queue-level configuration overrides all
+     * task-level configuration
+     * 
+ * + * ALWAYS = 2; + */ + public static final int ALWAYS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UriOverrideEnforceMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UriOverrideEnforceMode forNumber(int value) { + switch (value) { + case 0: + return URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED; + case 1: + return IF_NOT_EXISTS; + case 2: + return ALWAYS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UriOverrideEnforceMode findValueByNumber(int number) { + return UriOverrideEnforceMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.UriOverride.getDescriptor().getEnumTypes().get(1); + } + + private static final UriOverrideEnforceMode[] VALUES = values(); + + public static UriOverrideEnforceMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UriOverrideEnforceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode) + } + + private int bitField0_; + public static final int SCHEME_FIELD_NUMBER = 1; + private int scheme_ = 0; + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + @java.lang.Override + public boolean hasScheme() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + @java.lang.Override + public int getSchemeValue() { + return scheme_; + } + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride.Scheme getScheme() { + com.google.cloud.tasks.v2beta2.UriOverride.Scheme result = + com.google.cloud.tasks.v2beta2.UriOverride.Scheme.forNumber(scheme_); + return result == null ? com.google.cloud.tasks.v2beta2.UriOverride.Scheme.UNRECOGNIZED : result; + } + + public static final int HOST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object host_ = ""; + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + @java.lang.Override + public boolean hasHost() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + private long port_ = 0L; + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + @java.lang.Override + public boolean hasPort() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + @java.lang.Override + public long getPort() { + return port_; + } + + public static final int PATH_OVERRIDE_FIELD_NUMBER = 4; + private com.google.cloud.tasks.v2beta2.PathOverride pathOverride_; + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + @java.lang.Override + public boolean hasPathOverride() { + return pathOverride_ != null; + } + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverride getPathOverride() { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance() + : pathOverride_; + } + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder getPathOverrideOrBuilder() { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance() + : pathOverride_; + } + + public static final int QUERY_OVERRIDE_FIELD_NUMBER = 5; + private com.google.cloud.tasks.v2beta2.QueryOverride queryOverride_; + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + @java.lang.Override + public boolean hasQueryOverride() { + return queryOverride_ != null; + } + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverride getQueryOverride() { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance() + : queryOverride_; + } + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder getQueryOverrideOrBuilder() { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance() + : queryOverride_; + } + + public static final int URI_OVERRIDE_ENFORCE_MODE_FIELD_NUMBER = 6; + private int uriOverrideEnforceMode_ = 0; + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + @java.lang.Override + public int getUriOverrideEnforceModeValue() { + return uriOverrideEnforceMode_; + } + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode + getUriOverrideEnforceMode() { + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode result = + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode.forNumber( + uriOverrideEnforceMode_); + return result == null + ? com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, scheme_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, port_); + } + if (pathOverride_ != null) { + output.writeMessage(4, getPathOverride()); + } + if (queryOverride_ != null) { + output.writeMessage(5, getQueryOverride()); + } + if (uriOverrideEnforceMode_ + != com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode + .URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, uriOverrideEnforceMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, scheme_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, port_); + } + if (pathOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPathOverride()); + } + if (queryOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getQueryOverride()); + } + if (uriOverrideEnforceMode_ + != com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode + .URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, uriOverrideEnforceMode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.UriOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.UriOverride other = + (com.google.cloud.tasks.v2beta2.UriOverride) obj; + + if (hasScheme() != other.hasScheme()) return false; + if (hasScheme()) { + if (scheme_ != other.scheme_) return false; + } + if (hasHost() != other.hasHost()) return false; + if (hasHost()) { + if (!getHost().equals(other.getHost())) return false; + } + if (hasPort() != other.hasPort()) return false; + if (hasPort()) { + if (getPort() != other.getPort()) return false; + } + if (hasPathOverride() != other.hasPathOverride()) return false; + if (hasPathOverride()) { + if (!getPathOverride().equals(other.getPathOverride())) return false; + } + if (hasQueryOverride() != other.hasQueryOverride()) return false; + if (hasQueryOverride()) { + if (!getQueryOverride().equals(other.getQueryOverride())) return false; + } + if (uriOverrideEnforceMode_ != other.uriOverrideEnforceMode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasScheme()) { + hash = (37 * hash) + SCHEME_FIELD_NUMBER; + hash = (53 * hash) + scheme_; + } + if (hasHost()) { + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + } + if (hasPort()) { + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPort()); + } + if (hasPathOverride()) { + hash = (37 * hash) + PATH_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getPathOverride().hashCode(); + } + if (hasQueryOverride()) { + hash = (37 * hash) + QUERY_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getQueryOverride().hashCode(); + } + hash = (37 * hash) + URI_OVERRIDE_ENFORCE_MODE_FIELD_NUMBER; + hash = (53 * hash) + uriOverrideEnforceMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.UriOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Uri Override.
+   *
+   * When specified, all the HTTP tasks inside the queue will be partially or
+   * fully overridden depending on the configured values.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UriOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.UriOverride) + com.google.cloud.tasks.v2beta2.UriOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_UriOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UriOverride.class, + com.google.cloud.tasks.v2beta2.UriOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.UriOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scheme_ = 0; + host_ = ""; + port_ = 0L; + pathOverride_ = null; + if (pathOverrideBuilder_ != null) { + pathOverrideBuilder_.dispose(); + pathOverrideBuilder_ = null; + } + queryOverride_ = null; + if (queryOverrideBuilder_ != null) { + queryOverrideBuilder_.dispose(); + queryOverrideBuilder_ = null; + } + uriOverrideEnforceMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto + .internal_static_google_cloud_tasks_v2beta2_UriOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride build() { + com.google.cloud.tasks.v2beta2.UriOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride buildPartial() { + com.google.cloud.tasks.v2beta2.UriOverride result = + new com.google.cloud.tasks.v2beta2.UriOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta2.UriOverride result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scheme_ = scheme_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.host_ = host_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.port_ = port_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pathOverride_ = + pathOverrideBuilder_ == null ? pathOverride_ : pathOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.queryOverride_ = + queryOverrideBuilder_ == null ? queryOverride_ : queryOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uriOverrideEnforceMode_ = uriOverrideEnforceMode_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.UriOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta2.UriOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.UriOverride other) { + if (other == com.google.cloud.tasks.v2beta2.UriOverride.getDefaultInstance()) return this; + if (other.hasScheme()) { + setScheme(other.getScheme()); + } + if (other.hasHost()) { + host_ = other.host_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPort()) { + setPort(other.getPort()); + } + if (other.hasPathOverride()) { + mergePathOverride(other.getPathOverride()); + } + if (other.hasQueryOverride()) { + mergeQueryOverride(other.getQueryOverride()); + } + if (other.uriOverrideEnforceMode_ != 0) { + setUriOverrideEnforceModeValue(other.getUriOverrideEnforceModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + scheme_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + port_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(getPathOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getQueryOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + uriOverrideEnforceMode_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int scheme_ = 0; + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + @java.lang.Override + public boolean hasScheme() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + @java.lang.Override + public int getSchemeValue() { + return scheme_; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @param value The enum numeric value on the wire for scheme to set. + * @return This builder for chaining. + */ + public Builder setSchemeValue(int value) { + scheme_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride.Scheme getScheme() { + com.google.cloud.tasks.v2beta2.UriOverride.Scheme result = + com.google.cloud.tasks.v2beta2.UriOverride.Scheme.forNumber(scheme_); + return result == null + ? com.google.cloud.tasks.v2beta2.UriOverride.Scheme.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @param value The scheme to set. + * @return This builder for chaining. + */ + public Builder setScheme(com.google.cloud.tasks.v2beta2.UriOverride.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + scheme_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return This builder for chaining. + */ + public Builder clearScheme() { + bitField0_ = (bitField0_ & ~0x00000001); + scheme_ = 0; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + public boolean hasHost() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + host_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long port_; + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + @java.lang.Override + public boolean hasPort() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + @java.lang.Override + public long getPort() { + return port_; + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(long value) { + + port_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000004); + port_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta2.PathOverride pathOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PathOverride, + com.google.cloud.tasks.v2beta2.PathOverride.Builder, + com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder> + pathOverrideBuilder_; + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + public boolean hasPathOverride() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + public com.google.cloud.tasks.v2beta2.PathOverride getPathOverride() { + if (pathOverrideBuilder_ == null) { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance() + : pathOverride_; + } else { + return pathOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public Builder setPathOverride(com.google.cloud.tasks.v2beta2.PathOverride value) { + if (pathOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pathOverride_ = value; + } else { + pathOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public Builder setPathOverride( + com.google.cloud.tasks.v2beta2.PathOverride.Builder builderForValue) { + if (pathOverrideBuilder_ == null) { + pathOverride_ = builderForValue.build(); + } else { + pathOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public Builder mergePathOverride(com.google.cloud.tasks.v2beta2.PathOverride value) { + if (pathOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && pathOverride_ != null + && pathOverride_ != com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance()) { + getPathOverrideBuilder().mergeFrom(value); + } else { + pathOverride_ = value; + } + } else { + pathOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public Builder clearPathOverride() { + bitField0_ = (bitField0_ & ~0x00000008); + pathOverride_ = null; + if (pathOverrideBuilder_ != null) { + pathOverrideBuilder_.dispose(); + pathOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public com.google.cloud.tasks.v2beta2.PathOverride.Builder getPathOverrideBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPathOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + public com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder getPathOverrideOrBuilder() { + if (pathOverrideBuilder_ != null) { + return pathOverrideBuilder_.getMessageOrBuilder(); + } else { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta2.PathOverride.getDefaultInstance() + : pathOverride_; + } + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PathOverride, + com.google.cloud.tasks.v2beta2.PathOverride.Builder, + com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder> + getPathOverrideFieldBuilder() { + if (pathOverrideBuilder_ == null) { + pathOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PathOverride, + com.google.cloud.tasks.v2beta2.PathOverride.Builder, + com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder>( + getPathOverride(), getParentForChildren(), isClean()); + pathOverride_ = null; + } + return pathOverrideBuilder_; + } + + private com.google.cloud.tasks.v2beta2.QueryOverride queryOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueryOverride, + com.google.cloud.tasks.v2beta2.QueryOverride.Builder, + com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder> + queryOverrideBuilder_; + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + public boolean hasQueryOverride() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + public com.google.cloud.tasks.v2beta2.QueryOverride getQueryOverride() { + if (queryOverrideBuilder_ == null) { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance() + : queryOverride_; + } else { + return queryOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public Builder setQueryOverride(com.google.cloud.tasks.v2beta2.QueryOverride value) { + if (queryOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryOverride_ = value; + } else { + queryOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public Builder setQueryOverride( + com.google.cloud.tasks.v2beta2.QueryOverride.Builder builderForValue) { + if (queryOverrideBuilder_ == null) { + queryOverride_ = builderForValue.build(); + } else { + queryOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public Builder mergeQueryOverride(com.google.cloud.tasks.v2beta2.QueryOverride value) { + if (queryOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && queryOverride_ != null + && queryOverride_ + != com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance()) { + getQueryOverrideBuilder().mergeFrom(value); + } else { + queryOverride_ = value; + } + } else { + queryOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public Builder clearQueryOverride() { + bitField0_ = (bitField0_ & ~0x00000010); + queryOverride_ = null; + if (queryOverrideBuilder_ != null) { + queryOverrideBuilder_.dispose(); + queryOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public com.google.cloud.tasks.v2beta2.QueryOverride.Builder getQueryOverrideBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getQueryOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + public com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder getQueryOverrideOrBuilder() { + if (queryOverrideBuilder_ != null) { + return queryOverrideBuilder_.getMessageOrBuilder(); + } else { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta2.QueryOverride.getDefaultInstance() + : queryOverride_; + } + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueryOverride, + com.google.cloud.tasks.v2beta2.QueryOverride.Builder, + com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder> + getQueryOverrideFieldBuilder() { + if (queryOverrideBuilder_ == null) { + queryOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueryOverride, + com.google.cloud.tasks.v2beta2.QueryOverride.Builder, + com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder>( + getQueryOverride(), getParentForChildren(), isClean()); + queryOverride_ = null; + } + return queryOverrideBuilder_; + } + + private int uriOverrideEnforceMode_ = 0; + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + @java.lang.Override + public int getUriOverrideEnforceModeValue() { + return uriOverrideEnforceMode_; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @param value The enum numeric value on the wire for uriOverrideEnforceMode to set. + * @return This builder for chaining. + */ + public Builder setUriOverrideEnforceModeValue(int value) { + uriOverrideEnforceMode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode + getUriOverrideEnforceMode() { + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode result = + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode.forNumber( + uriOverrideEnforceMode_); + return result == null + ? com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @param value The uriOverrideEnforceMode to set. + * @return This builder for chaining. + */ + public Builder setUriOverrideEnforceMode( + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + uriOverrideEnforceMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearUriOverrideEnforceMode() { + bitField0_ = (bitField0_ & ~0x00000020); + uriOverrideEnforceMode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.UriOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.UriOverride) + private static final com.google.cloud.tasks.v2beta2.UriOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.UriOverride(); + } + + public static com.google.cloud.tasks.v2beta2.UriOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UriOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.UriOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverrideOrBuilder.java new file mode 100644 index 000000000000..5e34046baa85 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UriOverrideOrBuilder.java @@ -0,0 +1,281 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface UriOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.UriOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + boolean hasScheme(); + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + int getSchemeValue(); + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + com.google.cloud.tasks.v2beta2.UriOverride.Scheme getScheme(); + + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + boolean hasHost(); + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + boolean hasPort(); + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + long getPort(); + + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + boolean hasPathOverride(); + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + com.google.cloud.tasks.v2beta2.PathOverride getPathOverride(); + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + com.google.cloud.tasks.v2beta2.PathOverrideOrBuilder getPathOverrideOrBuilder(); + + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + boolean hasQueryOverride(); + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + com.google.cloud.tasks.v2beta2.QueryOverride getQueryOverride(); + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + com.google.cloud.tasks.v2beta2.QueryOverrideOrBuilder getQueryOverrideOrBuilder(); + + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + int getUriOverrideEnforceModeValue(); + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + com.google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode getUriOverrideEnforceMode(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto index a0c27279a156..a1d27d749daa 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package google.cloud.tasks.v2beta2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta2/queue.proto"; import "google/cloud/tasks/v2beta2/task.proto"; @@ -34,6 +35,10 @@ option java_multiple_files = true; option java_outer_classname = "CloudTasksProto"; option java_package = "com.google.cloud.tasks.v2beta2"; option objc_class_prefix = "TASKS"; +option (google.api.resource_definition) = { + type: "cloudtasks.googleapis.com/Location" + pattern: "projects/{project}/locations/{location}" +}; // Cloud Tasks allows developers to manage the execution of background // work in their applications. @@ -176,6 +181,13 @@ service CloudTasks { option (google.api.method_signature) = "name"; } + // Update queue list by uploading a queue.yaml file. + // + // The queue.yaml file is supplied in the request body as a YAML encoded + // string. This method was added to support gcloud clients versions before + // 322.0.0. New clients should use CreateQueue instead of this method. + rpc UploadQueueYaml(UploadQueueYamlRequest) returns (google.protobuf.Empty) {} + // Gets the access control policy for a // [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the // resource exists and does not have a policy set. @@ -402,6 +414,25 @@ service CloudTasks { }; option (google.api.method_signature) = "name"; } + + // Creates and buffers a new task without the need to explicitly define a Task + // message. The queue must have [HTTP + // target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a + // custom ID, use the following format and set TASK_ID to your desired ID: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer + // To create the task with an automatically generated ID, use the following + // format: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. + // Note: This feature is in its experimental stage. You must request access to + // the API through the [Cloud Tasks BufferTask Experiment Signup + // form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + rpc BufferTask(BufferTaskRequest) returns (BufferTaskResponse) { + option (google.api.http) = { + post: "/v2beta2/{queue=projects/*/locations/*/queues/*}/tasks/{task_id}:buffer" + body: "*" + }; + option (google.api.method_signature) = "queue,task_id,body"; + } } // Request message for @@ -591,6 +622,18 @@ message ResumeQueueRequest { ]; } +// Request message for +// [UploadQueueYaml][google.cloud.tasks.v2beta2.CloudTasks.UploadQueueYaml]. +message UploadQueueYamlRequest { + // Required. The App ID is supplied as an HTTP parameter. Unlike internal + // usage of App ID, it does not include a region prefix. Rather, the App ID + // represents the Project ID against which to make the request. + string app_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The http body contains the queue.yaml file which used to update queue lists + optional google.api.HttpBody http_body = 2; +} + // Request message for listing tasks using // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. message ListTasksRequest { @@ -716,10 +759,10 @@ message CreateTaskRequest { // that was deleted or completed recently then the call will fail // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. // If the task's queue was created using Cloud Tasks, then another task with - // the same name can't be created for ~1hour after the original task was + // the same name can't be created for ~1 hour after the original task was // deleted or completed. If the task's queue was created using queue.yaml or // queue.xml, then another task with the same name can't be created - // for ~9days after the original task was deleted or completed. + // for ~9 days after the original task was deleted or completed. // // Because there is an extra lookup cost to identify duplicate task // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] @@ -985,3 +1028,36 @@ message RunTaskRequest { // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; } + +// LINT.IfChange +// Request message for +// [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. +message BufferTaskRequest { + // Required. The parent queue name. For example: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + string queue = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; + + // Optional. Task ID for the task being created. If not provided, a random + // task ID is assigned to the task. + string task_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Body of the HTTP request. + // + // The body can take any generic value. The value is written to the + // [HttpRequest][payload] of the [Task]. + google.api.HttpBody body = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [BufferTask][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. +message BufferTaskResponse { + // The created task. + Task task = 1; +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/old_target.proto b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/old_target.proto new file mode 100644 index 000000000000..17179fa29bea --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/old_target.proto @@ -0,0 +1,22 @@ +// Copyright 2023 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.tasks.v2beta2; + +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; +option java_multiple_files = true; +option java_outer_classname = "OldTargetProto"; +option java_package = "com.google.cloud.tasks.v2beta2"; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto index 0872bff0379d..587ecb1eb599 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -119,6 +119,9 @@ message Queue { // A pull queue is a queue that has a // [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. PullTarget pull_target = 4; + + // An http_target is used to override the target values for HTTP tasks. + HttpTarget http_target = 17; } // Rate limits for task dispatches. @@ -154,7 +157,7 @@ message Queue { // Output only. The state of the queue. // - // `state` can only be changed by calling + // `state` can only be changed by called // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or // uploading diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto index b200f24410e0..584f5b061e1c 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.tasks.v2beta2; +import "google/api/field_behavior.proto"; + option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TargetProto"; @@ -377,6 +379,318 @@ message AppEngineRouting { string host = 4; } +// HTTP request. +// +// The task will be pushed to the worker as an HTTP request. An HTTP request +// embodies a url, an http method, headers, body and authorization for the http +// task. +message HttpRequest { + // Required. The full url path that the request will be sent to. + // + // This string must begin with either "http://" or "https://". Some examples + // are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + // encode some characters for safety and compatibility. The maximum allowed + // URL length is 2083 characters after encoding. + // + // The `Location` header response from a redirect response [`300` - `399`] + // may be followed. The redirect is not counted as a separate attempt. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // The HTTP method to use for the request. The default is POST. + HttpMethod http_method = 2; + + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when running the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + // + // These headers represent a subset of the headers that will accompany the + // task's HTTP request. Some HTTP request headers will be ignored or replaced. + // + // A partial list of headers that will be ignored or replaced is: + // + // * Any header that is prefixed with "X-CloudTasks-" will be treated + // as service header. Service headers define properties of the task and are + // predefined in CloudTask. + // * Host: This will be computed by Cloud Tasks and derived from + // [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + // * Content-Length: This will be computed by Cloud Tasks. + // * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + // * `X-Google-*`: Google use only. + // * `X-AppEngine-*`: Google use only. + // + // `Content-Type` won't be set by Cloud Tasks. You can explicitly set + // `Content-Type` to a media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/octet-stream"` or + // `"application/json"`. + // + // Headers which can have multiple values (according to RFC2616) can be + // specified using comma-separated values. + // + // The size of the headers must be less than 80KB. + map headers = 3; + + // HTTP request body. + // + // A request body is allowed only if the + // [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, + // PUT, or PATCH. It is an error to set body on a task with an incompatible + // [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + bytes body = 4; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the + // [HttpRequest.headers][google.cloud.tasks.v2beta2.HttpRequest.headers] field + // will be overridden. + oneof authorization_header { + // If specified, an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + // will be generated and attached as an `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OAuthToken oauth_token = 5; + + // If specified, an + // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in the + // HTTP request. + // + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. + OidcToken oidc_token = 6; + } +} + +// PathOverride. +// +// Path message defines path override for HTTP targets. +message PathOverride { + // The URI path (e.g., /users/1234). Default is an empty string. + string path = 1; +} + +// QueryOverride. +// +// Query message defines query override for HTTP targets. +message QueryOverride { + // The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + // string. + string query_params = 1; +} + +// Uri Override. +// +// When specified, all the HTTP tasks inside the queue will be partially or +// fully overridden depending on the configured values. +message UriOverride { + // The Scheme for an HTTP request. By default, it is HTTPS. + enum Scheme { + // Scheme unspecified. Defaults to HTTPS. + SCHEME_UNSPECIFIED = 0; + + // Convert the scheme to HTTP, e.g., https://www.google.ca will change to + // http://www.google.ca. + HTTP = 1; + + // Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + // https://www.google.ca. + HTTPS = 2; + } + + // UriOverrideEnforceMode mode is to define enforcing mode for the override + // modes. + enum UriOverrideEnforceMode { + // OverrideMode Unspecified. Defaults to ALWAYS. + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + + // In the IF_NOT_EXISTS mode, queue-level configuration is only + // applied where task-level configuration does not exist. + IF_NOT_EXISTS = 1; + + // In the ALWAYS mode, queue-level configuration overrides all + // task-level configuration + ALWAYS = 2; + } + + // Scheme override. + // + // When specified, the task URI scheme is replaced by the provided value (HTTP + // or HTTPS). + optional Scheme scheme = 1; + + // Host override. + // + // When specified, replaces the host part of the task URL. For example, + // if the task URL is "https://www.google.com," and host value is set to + // "example.net", the overridden URI will be changed to "https://example.net." + // Host value cannot be an empty string (INVALID_ARGUMENT). + optional string host = 2; + + // Port override. + // + // When specified, replaces the port part of the task URI. For instance, + // for a URI http://www.google.com/foo and port=123, the overridden URI + // becomes http://www.google.com:123/foo. Note that the port value must be a + // positive integer. Setting the port to 0 (Zero) clears the URI port. + optional int64 port = 3; + + // URI path. + // + // When specified, replaces the existing path of the task URL. Setting the + // path value to an empty string clears the URI path segment. + PathOverride path_override = 4; + + // URI Query. + // + // When specified, replaces the query part of the task URI. Setting the + // query value to an empty string clears the URI query segment. + QueryOverride query_override = 5; + + // URI Override Enforce Mode + // + // When specified, determines the Target UriOverride mode. If not specified, + // it defaults to ALWAYS. + UriOverrideEnforceMode uri_override_enforce_mode = 6; +} + +// HTTP target. +// +// When specified as a [Queue][target_type], all the tasks with [HttpRequest] +// will be overridden according to the target. +message HttpTarget { + // Defines a header message. A header can have a key and a value. + message Header { + // The key of the header. + string key = 1; + + // The value of the header. + string value = 2; + } + + // Wraps the Header object. + message HeaderOverride { + // header embodying a key and a value. + Header header = 1; + } + + // Uri override. + // + // When specified, overrides the execution Uri for all the tasks in the queue. + UriOverride uri_override = 1; + + // The HTTP method to use for the request. + // + // When specified, it overrides + // [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the + // task. Note that if the value is set to [HttpMethod][GET] the + // [HttpRequest][body] of the task will be ignored at execution time. + HttpMethod http_method = 2; + + // HTTP target headers. + // + // This map contains the header field names and values. + // Headers will be set when running the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + // + // These headers represent a subset of the headers that will accompany the + // task's HTTP request. Some HTTP request headers will be ignored or replaced. + // + // A partial list of headers that will be ignored or replaced is: + // * Any header that is prefixed with "X-CloudTasks-" will be treated + // as service header. Service headers define properties of the task and are + // predefined in CloudTask. + // * Host: This will be computed by Cloud Tasks and derived from + // [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + // * Content-Length: This will be computed by Cloud Tasks. + // * User-Agent: This will be set to `"Google-CloudTasks"`. + // * `X-Google-*`: Google use only. + // * `X-AppEngine-*`: Google use only. + // + // `Content-Type` won't be set by Cloud Tasks. You can explicitly set + // `Content-Type` to a media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/octet-stream"` or + // `"application/json"`. + // + // Headers which can have multiple values (according to RFC2616) can be + // specified using comma-separated values. + // + // The size of the headers must be less than 80KB. + // Queue-level headers to override headers of all the tasks in the queue. + repeated HeaderOverride header_overrides = 3; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the + // [HttpRequest.headers][google.cloud.tasks.v2beta2.HttpRequest.headers] field + // will be overridden. + oneof authorization_header { + // If specified, an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + // will be generated and attached as an `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OAuthToken oauth_token = 5; + + // If specified, an + // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in the + // HTTP request. + // + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. + OidcToken oidc_token = 6; + } +} + +// Contains information needed for generating an +// [OAuth token](https://developers.google.com/identity/protocols/OAuth2). +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. +message OAuthToken { + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OAuth token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + string service_account_email = 1; + + // OAuth scope to be used for generating OAuth access token. + // If not specified, "https://www.googleapis.com/auth/cloud-platform" + // will be used. + string scope = 2; +} + +// Contains information needed for generating an +// [OpenID Connect +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. +message OidcToken { + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OIDC token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + string service_account_email = 1; + + // Audience to be used when generating OIDC token. If not specified, the URI + // specified in target will be used. + string audience = 2; +} + // The HTTP method used to execute the task. enum HttpMethod { // HTTP method unspecified @@ -396,4 +710,10 @@ enum HttpMethod { // HTTP DELETE DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // HTTP OPTIONS + OPTIONS = 7; } diff --git a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto index 7e68106bac62..467ee103191c 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -113,6 +113,12 @@ message Task { // A pull task is a task that has // [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. PullMessage pull_message = 4; + + // HTTP request that is sent to the task's target. + // + // An HTTP task is a task that has + // [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. + HttpRequest http_request = 13; } // The time when the task is scheduled to be attempted. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequest.java new file mode 100644 index 000000000000..36d513ebfc92 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequest.java @@ -0,0 +1,1141 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/cloudtasks.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * Request message for
+ * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.BufferTaskRequest} + */ +public final class BufferTaskRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.BufferTaskRequest) + BufferTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BufferTaskRequest.newBuilder() to construct. + private BufferTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BufferTaskRequest() { + queue_ = ""; + taskId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BufferTaskRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.BufferTaskRequest.class, + com.google.cloud.tasks.v2beta3.BufferTaskRequest.Builder.class); + } + + public static final int QUEUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object queue_ = ""; + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + @java.lang.Override + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + 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(); + queue_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object taskId_ = ""; + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + @java.lang.Override + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + 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(); + taskId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BODY_FIELD_NUMBER = 3; + private com.google.api.HttpBody body_; + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + @java.lang.Override + public boolean hasBody() { + return body_ != null; + } + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + @java.lang.Override + public com.google.api.HttpBody getBody() { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.api.HttpBodyOrBuilder getBodyOrBuilder() { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, taskId_); + } + if (body_ != null) { + output.writeMessage(3, getBody()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, taskId_); + } + if (body_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBody()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.BufferTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.BufferTaskRequest other = + (com.google.cloud.tasks.v2beta3.BufferTaskRequest) obj; + + if (!getQueue().equals(other.getQueue())) return false; + if (!getTaskId().equals(other.getTaskId())) return false; + if (hasBody() != other.hasBody()) return false; + if (hasBody()) { + if (!getBody().equals(other.getBody())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + if (hasBody()) { + hash = (37 * hash) + BODY_FIELD_NUMBER; + hash = (53 * hash) + getBody().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.BufferTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.BufferTaskRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.BufferTaskRequest) + com.google.cloud.tasks.v2beta3.BufferTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.BufferTaskRequest.class, + com.google.cloud.tasks.v2beta3.BufferTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.BufferTaskRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queue_ = ""; + taskId_ = ""; + body_ = null; + if (bodyBuilder_ != null) { + bodyBuilder_.dispose(); + bodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.BufferTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskRequest build() { + com.google.cloud.tasks.v2beta3.BufferTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta3.BufferTaskRequest result = + new com.google.cloud.tasks.v2beta3.BufferTaskRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.BufferTaskRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queue_ = queue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.body_ = bodyBuilder_ == null ? body_ : bodyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.BufferTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta3.BufferTaskRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.BufferTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta3.BufferTaskRequest.getDefaultInstance()) + return this; + if (!other.getQueue().isEmpty()) { + queue_ = other.queue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBody()) { + mergeBody(other.getBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getBodyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object queue_ = ""; + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + public java.lang.String getQueue() { + java.lang.Object ref = queue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + public com.google.protobuf.ByteString getQueueBytes() { + java.lang.Object ref = queue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The queue to set. + * @return This builder for chaining. + */ + public Builder setQueue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearQueue() { + queue_ = getDefaultInstance().getQueue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent queue name. For example:
+     * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     *
+     * The queue must already exist.
+     * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for queue to set. + * @return This builder for chaining. + */ + public Builder setQueueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object taskId_ = ""; + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + public com.google.protobuf.ByteString getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Task ID for the task being created. If not provided, a random
+     * task ID is assigned to the task.
+     * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + taskId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.api.HttpBody body_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + bodyBuilder_; + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + public boolean hasBody() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + public com.google.api.HttpBody getBody() { + if (bodyBuilder_ == null) { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } else { + return bodyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBody(com.google.api.HttpBody value) { + if (bodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + } else { + bodyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setBody(com.google.api.HttpBody.Builder builderForValue) { + if (bodyBuilder_ == null) { + body_ = builderForValue.build(); + } else { + bodyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeBody(com.google.api.HttpBody value) { + if (bodyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && body_ != null + && body_ != com.google.api.HttpBody.getDefaultInstance()) { + getBodyBuilder().mergeFrom(value); + } else { + body_ = value; + } + } else { + bodyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000004); + body_ = null; + if (bodyBuilder_ != null) { + bodyBuilder_.dispose(); + bodyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBody.Builder getBodyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBodyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.api.HttpBodyOrBuilder getBodyOrBuilder() { + if (bodyBuilder_ != null) { + return bodyBuilder_.getMessageOrBuilder(); + } else { + return body_ == null ? com.google.api.HttpBody.getDefaultInstance() : body_; + } + } + /** + * + * + *
+     * Optional. Body of the HTTP request.
+     *
+     * The body can take any generic value. The value is written to the
+     * [HttpRequest][payload] of the [Task].
+     * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + getBodyFieldBuilder() { + if (bodyBuilder_ == null) { + bodyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder>(getBody(), getParentForChildren(), isClean()); + body_ = null; + } + return bodyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.BufferTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.BufferTaskRequest) + private static final com.google.cloud.tasks.v2beta3.BufferTaskRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.BufferTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BufferTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequestOrBuilder.java new file mode 100644 index 000000000000..ec09924b0758 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/cloudtasks.proto + +package com.google.cloud.tasks.v2beta3; + +public interface BufferTaskRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.BufferTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The queue. + */ + java.lang.String getQueue(); + /** + * + * + *
+   * Required. The parent queue name. For example:
+   * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   *
+   * The queue must already exist.
+   * 
+ * + * + * string queue = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for queue. + */ + com.google.protobuf.ByteString getQueueBytes(); + + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskId. + */ + java.lang.String getTaskId(); + /** + * + * + *
+   * Optional. Task ID for the task being created. If not provided, a random
+   * task ID is assigned to the task.
+   * 
+ * + * string task_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskId. + */ + com.google.protobuf.ByteString getTaskIdBytes(); + + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the body field is set. + */ + boolean hasBody(); + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The body. + */ + com.google.api.HttpBody getBody(); + /** + * + * + *
+   * Optional. Body of the HTTP request.
+   *
+   * The body can take any generic value. The value is written to the
+   * [HttpRequest][payload] of the [Task].
+   * 
+ * + * .google.api.HttpBody body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.api.HttpBodyOrBuilder getBodyOrBuilder(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponse.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponse.java new file mode 100644 index 000000000000..42fd83c17a39 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponse.java @@ -0,0 +1,699 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/cloudtasks.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * Response message for
+ * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.BufferTaskResponse} + */ +public final class BufferTaskResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.BufferTaskResponse) + BufferTaskResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BufferTaskResponse.newBuilder() to construct. + private BufferTaskResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BufferTaskResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BufferTaskResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.BufferTaskResponse.class, + com.google.cloud.tasks.v2beta3.BufferTaskResponse.Builder.class); + } + + public static final int TASK_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta3.Task task_; + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return Whether the task field is set. + */ + @java.lang.Override + public boolean hasTask() { + return task_ != null; + } + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return The task. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.Task getTask() { + return task_ == null ? com.google.cloud.tasks.v2beta3.Task.getDefaultInstance() : task_; + } + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { + return task_ == null ? com.google.cloud.tasks.v2beta3.Task.getDefaultInstance() : task_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (task_ != null) { + output.writeMessage(1, getTask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (task_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.BufferTaskResponse)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.BufferTaskResponse other = + (com.google.cloud.tasks.v2beta3.BufferTaskResponse) obj; + + if (hasTask() != other.hasTask()) return false; + if (hasTask()) { + if (!getTask().equals(other.getTask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTask()) { + hash = (37 * hash) + TASK_FIELD_NUMBER; + hash = (53 * hash) + getTask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.BufferTaskResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.BufferTaskResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.BufferTaskResponse) + com.google.cloud.tasks.v2beta3.BufferTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.BufferTaskResponse.class, + com.google.cloud.tasks.v2beta3.BufferTaskResponse.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.BufferTaskResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.CloudTasksProto + .internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskResponse getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.BufferTaskResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskResponse build() { + com.google.cloud.tasks.v2beta3.BufferTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskResponse buildPartial() { + com.google.cloud.tasks.v2beta3.BufferTaskResponse result = + new com.google.cloud.tasks.v2beta3.BufferTaskResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.BufferTaskResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.task_ = taskBuilder_ == null ? task_ : taskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.BufferTaskResponse) { + return mergeFrom((com.google.cloud.tasks.v2beta3.BufferTaskResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.BufferTaskResponse other) { + if (other == com.google.cloud.tasks.v2beta3.BufferTaskResponse.getDefaultInstance()) + return this; + if (other.hasTask()) { + mergeTask(other.getTask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta3.Task task_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.Task, + com.google.cloud.tasks.v2beta3.Task.Builder, + com.google.cloud.tasks.v2beta3.TaskOrBuilder> + taskBuilder_; + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return Whether the task field is set. + */ + public boolean hasTask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return The task. + */ + public com.google.cloud.tasks.v2beta3.Task getTask() { + if (taskBuilder_ == null) { + return task_ == null ? com.google.cloud.tasks.v2beta3.Task.getDefaultInstance() : task_; + } else { + return taskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public Builder setTask(com.google.cloud.tasks.v2beta3.Task value) { + if (taskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + } else { + taskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public Builder setTask(com.google.cloud.tasks.v2beta3.Task.Builder builderForValue) { + if (taskBuilder_ == null) { + task_ = builderForValue.build(); + } else { + taskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public Builder mergeTask(com.google.cloud.tasks.v2beta3.Task value) { + if (taskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && task_ != null + && task_ != com.google.cloud.tasks.v2beta3.Task.getDefaultInstance()) { + getTaskBuilder().mergeFrom(value); + } else { + task_ = value; + } + } else { + taskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public Builder clearTask() { + bitField0_ = (bitField0_ & ~0x00000001); + task_ = null; + if (taskBuilder_ != null) { + taskBuilder_.dispose(); + taskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public com.google.cloud.tasks.v2beta3.Task.Builder getTaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { + if (taskBuilder_ != null) { + return taskBuilder_.getMessageOrBuilder(); + } else { + return task_ == null ? com.google.cloud.tasks.v2beta3.Task.getDefaultInstance() : task_; + } + } + /** + * + * + *
+     * The created task.
+     * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.Task, + com.google.cloud.tasks.v2beta3.Task.Builder, + com.google.cloud.tasks.v2beta3.TaskOrBuilder> + getTaskFieldBuilder() { + if (taskBuilder_ == null) { + taskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.Task, + com.google.cloud.tasks.v2beta3.Task.Builder, + com.google.cloud.tasks.v2beta3.TaskOrBuilder>( + getTask(), getParentForChildren(), isClean()); + task_ = null; + } + return taskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.BufferTaskResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.BufferTaskResponse) + private static final com.google.cloud.tasks.v2beta3.BufferTaskResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.BufferTaskResponse(); + } + + public static com.google.cloud.tasks.v2beta3.BufferTaskResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BufferTaskResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.BufferTaskResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponseOrBuilder.java new file mode 100644 index 000000000000..50c9a8aa69df --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/BufferTaskResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/cloudtasks.proto + +package com.google.cloud.tasks.v2beta3; + +public interface BufferTaskResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.BufferTaskResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return Whether the task field is set. + */ + boolean hasTask(); + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + * + * @return The task. + */ + com.google.cloud.tasks.v2beta3.Task getTask(); + /** + * + * + *
+   * The created task.
+   * 
+ * + * .google.cloud.tasks.v2beta3.Task task = 1; + */ + com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksProto.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksProto.java index 7f886d72cb74..d111609fb31a 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksProto.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CloudTasksProto.java @@ -87,6 +87,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta3_RunTaskRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta3_RunTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -100,57 +108,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\032google.cloud.tasks.v2beta3\032\034googl" + "e/api/annotations.proto\032\027google/api/clie" + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032&google/clo" - + "ud/tasks/v2beta3/queue.proto\032%google/clo" - + "ud/tasks/v2beta3/task.proto\032\036google/iam/" - + "v1/iam_policy.proto\032\032google/iam/v1/polic" - + "y.proto\032\033google/protobuf/empty.proto\032 go" - + "ogle/protobuf/field_mask.proto\"\271\001\n\021ListQ" - + "ueuesRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037c" - + "loudtasks.googleapis.com/Queue\022\016\n\006filter" - + "\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030" - + "\004 \001(\t\0223\n\tread_mask\030\005 \001(\0132\032.google.protob" - + "uf.FieldMaskB\004\342A\001\001\"`\n\022ListQueuesResponse" - + "\0221\n\006queues\030\001 \003(\0132!.google.cloud.tasks.v2" - + "beta3.Queue\022\027\n\017next_page_token\030\002 \001(\t\"~\n\017" - + "GetQueueRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037" - + "cloudtasks.googleapis.com/Queue\0223\n\tread_" - + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\004" - + "\342A\001\001\"\206\001\n\022CreateQueueRequest\0228\n\006parent\030\001 " - + "\001(\tB(\342A\001\002\372A!\022\037cloudtasks.googleapis.com/" - + "Queue\0226\n\005queue\030\002 \001(\0132!.google.cloud.task" - + "s.v2beta3.QueueB\004\342A\001\002\"}\n\022UpdateQueueRequ" - + "est\0226\n\005queue\030\001 \001(\0132!.google.cloud.tasks." - + "v2beta3.QueueB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMask\"L\n\022DeleteQu" - + "eueRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloud" - + "tasks.googleapis.com/Queue\"K\n\021PurgeQueue" - + "Request\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtas" - + "ks.googleapis.com/Queue\"K\n\021PauseQueueReq" - + "uest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks." - + "googleapis.com/Queue\"L\n\022ResumeQueueReque" + + "o\032\031google/api/httpbody.proto\032\031google/api" + + "/resource.proto\032&google/cloud/tasks/v2be" + + "ta3/queue.proto\032%google/cloud/tasks/v2be" + + "ta3/task.proto\032\036google/iam/v1/iam_policy" + + ".proto\032\032google/iam/v1/policy.proto\032\033goog" + + "le/protobuf/empty.proto\032 google/protobuf" + + "/field_mask.proto\"\271\001\n\021ListQueuesRequest\022" + + "8\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022\037cloudtasks.goo" + + "gleapis.com/Queue\022\016\n\006filter\030\002 \001(\t\022\021\n\tpag" + + "e_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\0223\n\tread" + + "_mask\030\005 \001(\0132\032.google.protobuf.FieldMaskB" + + "\004\342A\001\001\"`\n\022ListQueuesResponse\0221\n\006queues\030\001 " + + "\003(\0132!.google.cloud.tasks.v2beta3.Queue\022\027" + + "\n\017next_page_token\030\002 \001(\t\"~\n\017GetQueueReque" + "st\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.go" - + "ogleapis.com/Queue\"\260\001\n\020ListTasksRequest\022" - + "7\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.goo" - + "gleapis.com/Task\022<\n\rresponse_view\030\002 \001(\0162" - + "%.google.cloud.tasks.v2beta3.Task.View\022\021" - + "\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"]\n" - + "\021ListTasksResponse\022/\n\005tasks\030\001 \003(\0132 .goog" - + "le.cloud.tasks.v2beta3.Task\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\205\001\n\016GetTaskRequest\0225\n\004name\030" + + "ogleapis.com/Queue\0223\n\tread_mask\030\002 \001(\0132\032." + + "google.protobuf.FieldMaskB\004\342A\001\001\"\206\001\n\022Crea" + + "teQueueRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!\022" + + "\037cloudtasks.googleapis.com/Queue\0226\n\005queu" + + "e\030\002 \001(\0132!.google.cloud.tasks.v2beta3.Que" + + "ueB\004\342A\001\002\"}\n\022UpdateQueueRequest\0226\n\005queue\030" + + "\001 \001(\0132!.google.cloud.tasks.v2beta3.Queue" + + "B\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMask\"L\n\022DeleteQueueRequest\0226\n" + + "\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.googlea" + + "pis.com/Queue\"K\n\021PurgeQueueRequest\0226\n\004na" + + "me\030\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis" + + ".com/Queue\"K\n\021PauseQueueRequest\0226\n\004name\030" + + "\001 \001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis.co" + + "m/Queue\"L\n\022ResumeQueueRequest\0226\n\004name\030\001 " + + "\001(\tB(\342A\001\002\372A!\n\037cloudtasks.googleapis.com/" + + "Queue\"\260\001\n\020ListTasksRequest\0227\n\006parent\030\001 \001" + + "(\tB\'\342A\001\002\372A \022\036cloudtasks.googleapis.com/T" + + "ask\022<\n\rresponse_view\030\002 \001(\0162%.google.clou" + + "d.tasks.v2beta3.Task.View\022\021\n\tpage_size\030\003" + + " \001(\005\022\022\n\npage_token\030\004 \001(\t\"]\n\021ListTasksRes" + + "ponse\022/\n\005tasks\030\001 \003(\0132 .google.cloud.task" + + "s.v2beta3.Task\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\205\001\n\016GetTaskRequest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A" + + " \n\036cloudtasks.googleapis.com/Task\022<\n\rres" + + "ponse_view\030\002 \001(\0162%.google.cloud.tasks.v2" + + "beta3.Task.View\"\300\001\n\021CreateTaskRequest\0227\n" + + "\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks.googl" + + "eapis.com/Task\0224\n\004task\030\002 \001(\0132 .google.cl" + + "oud.tasks.v2beta3.TaskB\004\342A\001\002\022<\n\rresponse" + + "_view\030\003 \001(\0162%.google.cloud.tasks.v2beta3" + + ".Task.View\"J\n\021DeleteTaskRequest\0225\n\004name\030" + "\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks.googleapis.co" - + "m/Task\022<\n\rresponse_view\030\002 \001(\0162%.google.c" - + "loud.tasks.v2beta3.Task.View\"\300\001\n\021CreateT" - + "askRequest\0227\n\006parent\030\001 \001(\tB\'\342A\001\002\372A \022\036clo" - + "udtasks.googleapis.com/Task\0224\n\004task\030\002 \001(" - + "\0132 .google.cloud.tasks.v2beta3.TaskB\004\342A\001" - + "\002\022<\n\rresponse_view\030\003 \001(\0162%.google.cloud." - + "tasks.v2beta3.Task.View\"J\n\021DeleteTaskReq" - + "uest\0225\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks." - + "googleapis.com/Task\"\205\001\n\016RunTaskRequest\0225" - + "\n\004name\030\001 \001(\tB\'\342A\001\002\372A \n\036cloudtasks.google" - + "apis.com/Task\022<\n\rresponse_view\030\002 \001(\0162%.g" - + "oogle.cloud.tasks.v2beta3.Task.View2\245\026\n\n" + + "m/Task\"\205\001\n\016RunTaskRequest\0225\n\004name\030\001 \001(\tB" + + "\'\342A\001\002\372A \n\036cloudtasks.googleapis.com/Task" + + "\022<\n\rresponse_view\030\002 \001(\0162%.google.cloud.t" + + "asks.v2beta3.Task.View\"\214\001\n\021BufferTaskReq" + + "uest\0226\n\005queue\030\001 \001(\tB\'\342A\001\002\372A \022\036cloudtasks" + + ".googleapis.com/Task\022\025\n\007task_id\030\002 \001(\tB\004\342" + + "A\001\001\022(\n\004body\030\003 \001(\0132\024.google.api.HttpBodyB" + + "\004\342A\001\001\"D\n\022BufferTaskResponse\022.\n\004task\030\001 \001(" + + "\0132 .google.cloud.tasks.v2beta3.Task2\374\027\n\n" + "CloudTasks\022\255\001\n\nListQueues\022-.google.cloud" + ".tasks.v2beta3.ListQueuesRequest\032..googl" + "e.cloud.tasks.v2beta3.ListQueuesResponse" @@ -220,12 +234,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eta3.RunTaskRequest\032 .google.cloud.tasks" + ".v2beta3.Task\"M\332A\004name\202\323\344\223\002@\";/v2beta3/{" + "name=projects/*/locations/*/queues/*/tas" - + "ks/*}:run:\001*\032M\312A\031cloudtasks.googleapis.c" - + "om\322A.https://www.googleapis.com/auth/clo" - + "ud-platformB\200\001\n\036com.google.cloud.tasks.v" - + "2beta3B\017CloudTasksProtoP\001ZCcloud.google." - + "com/go/cloudtasks/apiv2beta3/cloudtasksp" - + "b;cloudtaskspb\242\002\005TASKSb\006proto3" + + "ks/*}:run:\001*\022\324\001\n\nBufferTask\022-.google.clo" + + "ud.tasks.v2beta3.BufferTaskRequest\032..goo" + + "gle.cloud.tasks.v2beta3.BufferTaskRespon" + + "se\"g\332A\022queue,task_id,body\202\323\344\223\002L\"G/v2beta" + + "3/{queue=projects/*/locations/*/queues/*" + + "}/tasks/{task_id}:buffer:\001*\032M\312A\031cloudtas" + + "ks.googleapis.com\322A.https://www.googleap" + + "is.com/auth/cloud-platformB\200\001\n\036com.googl" + + "e.cloud.tasks.v2beta3B\017CloudTasksProtoP\001" + + "ZCcloud.google.com/go/cloudtasks/apiv2be" + + "ta3/cloudtaskspb;cloudtaskspb\242\002\005TASKSb\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -234,6 +254,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.HttpBodyProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.tasks.v2beta3.QueueProto.getDescriptor(), com.google.cloud.tasks.v2beta3.TaskProto.getDescriptor(), @@ -362,6 +383,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_BufferTaskRequest_descriptor, + new java.lang.String[] { + "Queue", "TaskId", "Body", + }); + internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_BufferTaskResponse_descriptor, + new java.lang.String[] { + "Task", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -375,6 +412,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.HttpBodyProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.tasks.v2beta3.QueueProto.getDescriptor(); com.google.cloud.tasks.v2beta3.TaskProto.getDescriptor(); diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequest.java index 9fed2c1e4ee2..7b932dc97b4b 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue].
+ * Request message for
+ * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.CreateQueueRequest} @@ -135,7 +136,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -153,7 +155,8 @@ public boolean hasQueue() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -171,7 +174,8 @@ public com.google.cloud.tasks.v2beta3.Queue getQueue() { *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -359,7 +363,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue].
+   * Request message for
+   * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.CreateQueueRequest} @@ -708,7 +713,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -725,7 +731,8 @@ public boolean hasQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -746,7 +753,8 @@ public com.google.cloud.tasks.v2beta3.Queue getQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -771,7 +779,8 @@ public Builder setQueue(com.google.cloud.tasks.v2beta3.Queue value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -793,7 +802,8 @@ public Builder setQueue(com.google.cloud.tasks.v2beta3.Queue.Builder builderForV *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -821,7 +831,8 @@ public Builder mergeQueue(com.google.cloud.tasks.v2beta3.Queue value) { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -843,7 +854,8 @@ public Builder clearQueue() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -860,7 +872,8 @@ public com.google.cloud.tasks.v2beta3.Queue.Builder getQueueBuilder() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -879,7 +892,8 @@ public com.google.cloud.tasks.v2beta3.QueueOrBuilder getQueueOrBuilder() { *
      * Required. The queue to create.
      *
-     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+     * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+     * an existing queue.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequestOrBuilder.java index 632d29624440..fa5b1bee2bac 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateQueueRequestOrBuilder.java @@ -68,7 +68,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -83,7 +84,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -98,7 +100,8 @@ public interface CreateQueueRequestOrBuilder *
    * Required. The queue to create.
    *
-   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue.
+   * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as
+   * an existing queue.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequest.java index 2921160ed2cd..6f03dbf5e9dc 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+ * Request message for
+ * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.CreateTaskRequest} @@ -134,13 +135,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -149,16 +150,16 @@ public com.google.protobuf.ByteString getParentBytes() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -182,13 +183,13 @@ public boolean hasTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -197,16 +198,16 @@ public boolean hasTask() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -230,13 +231,13 @@ public com.google.cloud.tasks.v2beta3.Task getTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -245,16 +246,16 @@ public com.google.cloud.tasks.v2beta3.Task getTask() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -275,18 +276,19 @@ public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -301,18 +303,19 @@ public int getResponseViewValue() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -512,7 +515,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * Request message for
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.CreateTaskRequest} @@ -866,13 +870,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -881,16 +885,16 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -913,13 +917,13 @@ public boolean hasTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -928,16 +932,16 @@ public boolean hasTask() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -964,13 +968,13 @@ public com.google.cloud.tasks.v2beta3.Task getTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -979,16 +983,16 @@ public com.google.cloud.tasks.v2beta3.Task getTask() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1019,13 +1023,13 @@ public Builder setTask(com.google.cloud.tasks.v2beta3.Task value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1034,16 +1038,16 @@ public Builder setTask(com.google.cloud.tasks.v2beta3.Task value) { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1071,13 +1075,13 @@ public Builder setTask(com.google.cloud.tasks.v2beta3.Task.Builder builderForVal * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1086,16 +1090,16 @@ public Builder setTask(com.google.cloud.tasks.v2beta3.Task.Builder builderForVal * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1129,13 +1133,13 @@ public Builder mergeTask(com.google.cloud.tasks.v2beta3.Task value) { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1144,16 +1148,16 @@ public Builder mergeTask(com.google.cloud.tasks.v2beta3.Task value) { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1181,13 +1185,13 @@ public Builder clearTask() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1196,16 +1200,16 @@ public Builder clearTask() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1228,13 +1232,13 @@ public com.google.cloud.tasks.v2beta3.Task.Builder getTaskBuilder() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1243,16 +1247,16 @@ public com.google.cloud.tasks.v2beta3.Task.Builder getTaskBuilder() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1277,13 +1281,13 @@ public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1292,16 +1296,16 @@ public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -1333,18 +1337,19 @@ public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTaskOrBuilder() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -1359,18 +1364,19 @@ public int getResponseViewValue() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -1388,18 +1394,19 @@ public Builder setResponseViewValue(int value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -1416,18 +1423,19 @@ public com.google.cloud.tasks.v2beta3.Task.View getResponseView() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -1448,18 +1456,19 @@ public Builder setResponseView(com.google.cloud.tasks.v2beta3.Task.View value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequestOrBuilder.java index fc846f9c5f4e..20a275fe72fb 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/CreateTaskRequestOrBuilder.java @@ -66,13 +66,13 @@ public interface CreateTaskRequestOrBuilder * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -81,16 +81,16 @@ public interface CreateTaskRequestOrBuilder * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -111,13 +111,13 @@ public interface CreateTaskRequestOrBuilder * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -126,16 +126,16 @@ public interface CreateTaskRequestOrBuilder * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -156,13 +156,13 @@ public interface CreateTaskRequestOrBuilder * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * [response][google.cloud.tasks.v2beta3.Task.name]. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -171,16 +171,16 @@ public interface CreateTaskRequestOrBuilder * that was deleted or executed recently then the call will fail * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was + * the same name can't be created for ~1 hour after the original task was * deleted or executed. If the task's queue was created using queue.yaml or * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. + * for ~9 days after the original task was deleted or executed. * * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -196,18 +196,19 @@ public interface CreateTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; @@ -219,18 +220,19 @@ public interface CreateTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 3; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequest.java index b60b851f9de3..b90d86c81ed8 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/DeleteQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
+ * Request message for
+ * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.DeleteQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
+   * Request message for
+   * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.DeleteQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java index d4301d7175f8..f82b9fdf77e4 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue].
+ * Request message for
+ * [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.GetQueueRequest} @@ -125,8 +126,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -144,8 +145,8 @@ public boolean hasReadMask() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -163,8 +164,8 @@ public com.google.protobuf.FieldMask getReadMask() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -354,7 +355,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue].
+   * Request message for
+   * [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.GetQueueRequest} @@ -680,8 +682,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -698,8 +700,8 @@ public boolean hasReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -720,8 +722,8 @@ public com.google.protobuf.FieldMask getReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -746,8 +748,8 @@ public Builder setReadMask(com.google.protobuf.FieldMask value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -769,8 +771,8 @@ public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -798,8 +800,8 @@ public Builder mergeReadMask(com.google.protobuf.FieldMask value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -821,8 +823,8 @@ public Builder clearReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -839,8 +841,8 @@ public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -859,8 +861,8 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java index 868a2bd1c62f..0c4fc8f3405b 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java @@ -58,8 +58,8 @@ public interface GetQueueRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -74,8 +74,8 @@ public interface GetQueueRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -90,8 +90,8 @@ public interface GetQueueRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequest.java index 45f8548f36ce..810380d09cbd 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+ * Request message for getting a task using
+ * [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.GetTaskRequest} @@ -126,18 +127,19 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -152,18 +154,19 @@ public int getResponseViewValue() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -349,7 +352,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * Request message for getting a task using
+   * [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.GetTaskRequest} @@ -666,18 +670,19 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -692,18 +697,19 @@ public int getResponseViewValue() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -721,18 +727,19 @@ public Builder setResponseViewValue(int value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -749,18 +756,19 @@ public com.google.cloud.tasks.v2beta3.Task.View getResponseView() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -781,18 +789,19 @@ public Builder setResponseView(com.google.cloud.tasks.v2beta3.Task.View value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequestOrBuilder.java index 33a162f61594..dc7b866ad639 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetTaskRequestOrBuilder.java @@ -58,18 +58,19 @@ public interface GetTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -81,18 +82,19 @@ public interface GetTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java index 0f2f59fde59e..81472e4ac999 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java @@ -297,6 +297,9 @@ public int getHeadersCount() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -346,6 +349,9 @@ public java.util.Map getHeaders() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -386,6 +392,9 @@ public java.util.Map getHeadersMap() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -433,6 +442,9 @@ public java.util.Map getHeadersMap() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1480,6 +1492,9 @@ public int getHeadersCount() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1529,6 +1544,9 @@ public java.util.Map getHeaders() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1569,6 +1587,9 @@ public java.util.Map getHeadersMap() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1616,6 +1637,9 @@ public java.util.Map getHeadersMap() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1669,6 +1693,9 @@ public Builder clearHeaders() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1718,6 +1745,9 @@ public java.util.Map getMutableHeaders() { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -1765,6 +1795,9 @@ public Builder putHeaders(java.lang.String key, java.lang.String value) { * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java index 093fcdbbbbf7..b5c780213dc4 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java @@ -104,6 +104,9 @@ public interface HttpRequestOrBuilder * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -141,6 +144,9 @@ public interface HttpRequestOrBuilder * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -181,6 +187,9 @@ public interface HttpRequestOrBuilder * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -218,6 +227,9 @@ public interface HttpRequestOrBuilder * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. @@ -259,6 +271,9 @@ java.lang.String getHeadersOrDefault( * * A partial list of headers that will be ignored or replaced is: * + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. * * Host: This will be computed by Cloud Tasks and derived from * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. * * Content-Length: This will be computed by Cloud Tasks. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTarget.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTarget.java new file mode 100644 index 000000000000..abe909c9c491 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTarget.java @@ -0,0 +1,4559 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * HTTP target.
+ *
+ * When specified as a [Queue][target_type], all the tasks with [HttpRequest]
+ * will be overridden according to the target.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget} + */ +public final class HttpTarget extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.HttpTarget) + HttpTargetOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpTarget.newBuilder() to construct. + private HttpTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpTarget() { + httpMethod_ = 0; + headerOverrides_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpTarget(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.class, + com.google.cloud.tasks.v2beta3.HttpTarget.Builder.class); + } + + public interface HeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.HttpTarget.Header) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Key of the header.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+     * The Key of the header.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * The Value of the header.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The Value of the header.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + } + /** + * + * + *
+   * Defines a header message. A header can have a key and a value.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget.Header} + */ + public static final class Header extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.HttpTarget.Header) + HeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use Header.newBuilder() to construct. + private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Header() { + key_ = ""; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Header(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.Header.class, + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+     * The Key of the header.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+     * The Key of the header.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + /** + * + * + *
+     * The Value of the header.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The Value of the header.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.HttpTarget.Header)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.HttpTarget.Header other = + (com.google.cloud.tasks.v2beta3.HttpTarget.Header) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.HttpTarget.Header prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Defines a header message. A header can have a key and a value.
+     * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget.Header} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.HttpTarget.Header) + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.Header.class, + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.HttpTarget.Header.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.Header getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.Header build() { + com.google.cloud.tasks.v2beta3.HttpTarget.Header result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.Header buildPartial() { + com.google.cloud.tasks.v2beta3.HttpTarget.Header result = + new com.google.cloud.tasks.v2beta3.HttpTarget.Header(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.HttpTarget.Header result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.HttpTarget.Header) { + return mergeFrom((com.google.cloud.tasks.v2beta3.HttpTarget.Header) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.HttpTarget.Header other) { + if (other == com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * + * + *
+       * The Key of the header.
+       * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Key of the header.
+       * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Key of the header.
+       * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The Key of the header.
+       * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The Key of the header.
+       * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The Value of the header.
+       * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The Value of the header.
+       * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The Value of the header.
+       * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The Value of the header.
+       * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The Value of the header.
+       * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.HttpTarget.Header) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.HttpTarget.Header) + private static final com.google.cloud.tasks.v2beta3.HttpTarget.Header DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.HttpTarget.Header(); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
PARSER = + new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.Header getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HeaderOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return The header. + */ + com.google.cloud.tasks.v2beta3.HttpTarget.Header getHeader(); + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder getHeaderOrBuilder(); + } + /** + * + * + *
+   * Wraps the Header object.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride} + */ + public static final class HeaderOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) + HeaderOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use HeaderOverride.newBuilder() to construct. + private HeaderOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HeaderOverride() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HeaderOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.class, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder.class); + } + + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta3.HttpTarget.Header header_; + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.Header getHeader() { + return header_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance() + : header_; + } + /** + * + * + *
+     * header embodying a key and a value.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance() + : header_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (header_ != null) { + output.writeMessage(1, getHeader()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride other = + (com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Wraps the Header object.
+     * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.class, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride build() { + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride buildPartial() { + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride result = + new com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride other) { + if (other == com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.getDefaultInstance()) + return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta3.HttpTarget.Header header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.Header, + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * + * @return The header. + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.Header getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public Builder setHeader(com.google.cloud.tasks.v2beta3.HttpTarget.Header value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public Builder setHeader( + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public Builder mergeHeader(com.google.cloud.tasks.v2beta3.HttpTarget.Header value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.Header.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+       * header embodying a key and a value.
+       * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.Header, + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.Header, + com.google.cloud.tasks.v2beta3.HttpTarget.Header.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride) + private static final com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride(); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeaderOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int authorizationHeaderCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authorizationHeader_; + + public enum AuthorizationHeaderCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OAUTH_TOKEN(5), + OIDC_TOKEN(6), + AUTHORIZATIONHEADER_NOT_SET(0); + private final int value; + + private AuthorizationHeaderCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthorizationHeaderCase valueOf(int value) { + return forNumber(value); + } + + public static AuthorizationHeaderCase forNumber(int value) { + switch (value) { + case 5: + return OAUTH_TOKEN; + case 6: + return OIDC_TOKEN; + case 0: + return AUTHORIZATIONHEADER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public static final int URI_OVERRIDE_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta3.UriOverride uriOverride_; + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + @java.lang.Override + public boolean hasUriOverride() { + return uriOverride_ != null; + } + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride getUriOverride() { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance() + : uriOverride_; + } + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder getUriOverrideOrBuilder() { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance() + : uriOverride_; + } + + public static final int HTTP_METHOD_FIELD_NUMBER = 2; + private int httpMethod_ = 0; + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta3.HttpMethod result = + com.google.cloud.tasks.v2beta3.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta3.HttpMethod.UNRECOGNIZED : result; + } + + public static final int HEADER_OVERRIDES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List headerOverrides_; + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public java.util.List + getHeaderOverridesList() { + return headerOverrides_; + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public java.util.List + getHeaderOverridesOrBuilderList() { + return headerOverrides_; + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public int getHeaderOverridesCount() { + return headerOverrides_.size(); + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getHeaderOverrides(int index) { + return headerOverrides_.get(index); + } + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder + getHeaderOverridesOrBuilder(int index) { + return headerOverrides_.get(index); + } + + public static final int OAUTH_TOKEN_FIELD_NUMBER = 5; + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OAuthToken getOauthToken() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } + + public static final int OIDC_TOKEN_FIELD_NUMBER = 6; + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OidcToken getOidcToken() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (uriOverride_ != null) { + output.writeMessage(1, getUriOverride()); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta3.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(2, httpMethod_); + } + for (int i = 0; i < headerOverrides_.size(); i++) { + output.writeMessage(3, headerOverrides_.get(i)); + } + if (authorizationHeaderCase_ == 5) { + output.writeMessage(5, (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + output.writeMessage(6, (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (uriOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUriOverride()); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta3.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, httpMethod_); + } + for (int i = 0; i < headerOverrides_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, headerOverrides_.get(i)); + } + if (authorizationHeaderCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_); + } + if (authorizationHeaderCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.HttpTarget)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.HttpTarget other = + (com.google.cloud.tasks.v2beta3.HttpTarget) obj; + + if (hasUriOverride() != other.hasUriOverride()) return false; + if (hasUriOverride()) { + if (!getUriOverride().equals(other.getUriOverride())) return false; + } + if (httpMethod_ != other.httpMethod_) return false; + if (!getHeaderOverridesList().equals(other.getHeaderOverridesList())) return false; + if (!getAuthorizationHeaderCase().equals(other.getAuthorizationHeaderCase())) return false; + switch (authorizationHeaderCase_) { + case 5: + if (!getOauthToken().equals(other.getOauthToken())) return false; + break; + case 6: + if (!getOidcToken().equals(other.getOidcToken())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUriOverride()) { + hash = (37 * hash) + URI_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getUriOverride().hashCode(); + } + hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; + hash = (53 * hash) + httpMethod_; + if (getHeaderOverridesCount() > 0) { + hash = (37 * hash) + HEADER_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + getHeaderOverridesList().hashCode(); + } + switch (authorizationHeaderCase_) { + case 5: + hash = (37 * hash) + OAUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOauthToken().hashCode(); + break; + case 6: + hash = (37 * hash) + OIDC_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getOidcToken().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.HttpTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * HTTP target.
+   *
+   * When specified as a [Queue][target_type], all the tasks with [HttpRequest]
+   * will be overridden according to the target.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpTarget} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.HttpTarget) + com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpTarget.class, + com.google.cloud.tasks.v2beta3.HttpTarget.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.HttpTarget.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uriOverride_ = null; + if (uriOverrideBuilder_ != null) { + uriOverrideBuilder_.dispose(); + uriOverrideBuilder_ = null; + } + httpMethod_ = 0; + if (headerOverridesBuilder_ == null) { + headerOverrides_ = java.util.Collections.emptyList(); + } else { + headerOverrides_ = null; + headerOverridesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (oauthTokenBuilder_ != null) { + oauthTokenBuilder_.clear(); + } + if (oidcTokenBuilder_ != null) { + oidcTokenBuilder_.clear(); + } + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget build() { + com.google.cloud.tasks.v2beta3.HttpTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget buildPartial() { + com.google.cloud.tasks.v2beta3.HttpTarget result = + new com.google.cloud.tasks.v2beta3.HttpTarget(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.tasks.v2beta3.HttpTarget result) { + if (headerOverridesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + headerOverrides_ = java.util.Collections.unmodifiableList(headerOverrides_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.headerOverrides_ = headerOverrides_; + } else { + result.headerOverrides_ = headerOverridesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.HttpTarget result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uriOverride_ = + uriOverrideBuilder_ == null ? uriOverride_ : uriOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpMethod_ = httpMethod_; + } + } + + private void buildPartialOneofs(com.google.cloud.tasks.v2beta3.HttpTarget result) { + result.authorizationHeaderCase_ = authorizationHeaderCase_; + result.authorizationHeader_ = this.authorizationHeader_; + if (authorizationHeaderCase_ == 5 && oauthTokenBuilder_ != null) { + result.authorizationHeader_ = oauthTokenBuilder_.build(); + } + if (authorizationHeaderCase_ == 6 && oidcTokenBuilder_ != null) { + result.authorizationHeader_ = oidcTokenBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.HttpTarget) { + return mergeFrom((com.google.cloud.tasks.v2beta3.HttpTarget) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.HttpTarget other) { + if (other == com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance()) return this; + if (other.hasUriOverride()) { + mergeUriOverride(other.getUriOverride()); + } + if (other.httpMethod_ != 0) { + setHttpMethodValue(other.getHttpMethodValue()); + } + if (headerOverridesBuilder_ == null) { + if (!other.headerOverrides_.isEmpty()) { + if (headerOverrides_.isEmpty()) { + headerOverrides_ = other.headerOverrides_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureHeaderOverridesIsMutable(); + headerOverrides_.addAll(other.headerOverrides_); + } + onChanged(); + } + } else { + if (!other.headerOverrides_.isEmpty()) { + if (headerOverridesBuilder_.isEmpty()) { + headerOverridesBuilder_.dispose(); + headerOverridesBuilder_ = null; + headerOverrides_ = other.headerOverrides_; + bitField0_ = (bitField0_ & ~0x00000004); + headerOverridesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getHeaderOverridesFieldBuilder() + : null; + } else { + headerOverridesBuilder_.addAllMessages(other.headerOverrides_); + } + } + } + switch (other.getAuthorizationHeaderCase()) { + case OAUTH_TOKEN: + { + mergeOauthToken(other.getOauthToken()); + break; + } + case OIDC_TOKEN: + { + mergeOidcToken(other.getOidcToken()); + break; + } + case AUTHORIZATIONHEADER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUriOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + httpMethod_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride m = + input.readMessage( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.parser(), + extensionRegistry); + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(m); + } else { + headerOverridesBuilder_.addMessage(m); + } + break; + } // case 26 + case 42: + { + input.readMessage(getOauthTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getOidcTokenFieldBuilder().getBuilder(), extensionRegistry); + authorizationHeaderCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int authorizationHeaderCase_ = 0; + private java.lang.Object authorizationHeader_; + + public AuthorizationHeaderCase getAuthorizationHeaderCase() { + return AuthorizationHeaderCase.forNumber(authorizationHeaderCase_); + } + + public Builder clearAuthorizationHeader() { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.cloud.tasks.v2beta3.UriOverride uriOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.UriOverride, + com.google.cloud.tasks.v2beta3.UriOverride.Builder, + com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder> + uriOverrideBuilder_; + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + public boolean hasUriOverride() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + public com.google.cloud.tasks.v2beta3.UriOverride getUriOverride() { + if (uriOverrideBuilder_ == null) { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance() + : uriOverride_; + } else { + return uriOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public Builder setUriOverride(com.google.cloud.tasks.v2beta3.UriOverride value) { + if (uriOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + uriOverride_ = value; + } else { + uriOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public Builder setUriOverride( + com.google.cloud.tasks.v2beta3.UriOverride.Builder builderForValue) { + if (uriOverrideBuilder_ == null) { + uriOverride_ = builderForValue.build(); + } else { + uriOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public Builder mergeUriOverride(com.google.cloud.tasks.v2beta3.UriOverride value) { + if (uriOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && uriOverride_ != null + && uriOverride_ != com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance()) { + getUriOverrideBuilder().mergeFrom(value); + } else { + uriOverride_ = value; + } + } else { + uriOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public Builder clearUriOverride() { + bitField0_ = (bitField0_ & ~0x00000001); + uriOverride_ = null; + if (uriOverrideBuilder_ != null) { + uriOverrideBuilder_.dispose(); + uriOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public com.google.cloud.tasks.v2beta3.UriOverride.Builder getUriOverrideBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUriOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + public com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder getUriOverrideOrBuilder() { + if (uriOverrideBuilder_ != null) { + return uriOverrideBuilder_.getMessageOrBuilder(); + } else { + return uriOverride_ == null + ? com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance() + : uriOverride_; + } + } + /** + * + * + *
+     * URI override.
+     *
+     * When specified, overrides the execution URI for all the tasks in the queue.
+     * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.UriOverride, + com.google.cloud.tasks.v2beta3.UriOverride.Builder, + com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder> + getUriOverrideFieldBuilder() { + if (uriOverrideBuilder_ == null) { + uriOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.UriOverride, + com.google.cloud.tasks.v2beta3.UriOverride.Builder, + com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder>( + getUriOverride(), getParentForChildren(), isClean()); + uriOverride_ = null; + } + return uriOverrideBuilder_; + } + + private int httpMethod_ = 0; + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + @java.lang.Override + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @param value The enum numeric value on the wire for httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethodValue(int value) { + httpMethod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta3.HttpMethod result = + com.google.cloud.tasks.v2beta3.HttpMethod.forNumber(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta3.HttpMethod.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @param value The httpMethod to set. + * @return This builder for chaining. + */ + public Builder setHttpMethod(com.google.cloud.tasks.v2beta3.HttpMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + httpMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request.
+     *
+     * When specified, it overrides
+     * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+     * task. Note that if the value is set to [HttpMethod][GET] the
+     * [HttpRequest][body] of the task will be ignored at execution time.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return This builder for chaining. + */ + public Builder clearHttpMethod() { + bitField0_ = (bitField0_ & ~0x00000002); + httpMethod_ = 0; + onChanged(); + return this; + } + + private java.util.List + headerOverrides_ = java.util.Collections.emptyList(); + + private void ensureHeaderOverridesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + headerOverrides_ = + new java.util.ArrayList( + headerOverrides_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder> + headerOverridesBuilder_; + + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List + getHeaderOverridesList() { + if (headerOverridesBuilder_ == null) { + return java.util.Collections.unmodifiableList(headerOverrides_); + } else { + return headerOverridesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public int getHeaderOverridesCount() { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.size(); + } else { + return headerOverridesBuilder_.getCount(); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getHeaderOverrides(int index) { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.get(index); + } else { + return headerOverridesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder setHeaderOverrides( + int index, com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.set(index, value); + onChanged(); + } else { + headerOverridesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder setHeaderOverrides( + int index, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.set(index, builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(value); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + int index, com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride value) { + if (headerOverridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(index, value); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addHeaderOverrides( + int index, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder builderForValue) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.add(index, builderForValue.build()); + onChanged(); + } else { + headerOverridesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder addAllHeaderOverrides( + java.lang.Iterable + values) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, headerOverrides_); + onChanged(); + } else { + headerOverridesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder clearHeaderOverrides() { + if (headerOverridesBuilder_ == null) { + headerOverrides_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + headerOverridesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public Builder removeHeaderOverrides(int index) { + if (headerOverridesBuilder_ == null) { + ensureHeaderOverridesIsMutable(); + headerOverrides_.remove(index); + onChanged(); + } else { + headerOverridesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder + getHeaderOverridesBuilder(int index) { + return getHeaderOverridesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder + getHeaderOverridesOrBuilder(int index) { + if (headerOverridesBuilder_ == null) { + return headerOverrides_.get(index); + } else { + return headerOverridesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder> + getHeaderOverridesOrBuilderList() { + if (headerOverridesBuilder_ != null) { + return headerOverridesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headerOverrides_); + } + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder + addHeaderOverridesBuilder() { + return getHeaderOverridesFieldBuilder() + .addBuilder( + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder + addHeaderOverridesBuilder(int index) { + return getHeaderOverridesFieldBuilder() + .addBuilder( + index, com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.getDefaultInstance()); + } + /** + * + * + *
+     * HTTP target headers.
+     *
+     * This map contains the header field names and values.
+     * Headers will be set when running the
+     * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+     * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+     *
+     * These headers represent a subset of the headers that will be configured for
+     * the task's HTTP request. Some HTTP request headers will be ignored or
+     * replaced.
+     *
+     * A partial list of headers that will be ignored or replaced is:
+     * * Several predefined headers, prefixed with "X-CloudTasks-", can
+     * be used to define properties of the task.
+     * * Host: This will be computed by Cloud Tasks and derived from
+     * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+     * * Content-Length: This will be computed by Cloud Tasks.
+     *
+     * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+     * `Content-Type` to a media type when the
+     *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+     *  `"application/json"`. The default value is set to "application/json"`.
+     *
+     * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+     *
+     * Headers which can have multiple values (according to RFC2616) can be
+     * specified using comma-separated values.
+     *
+     * The size of the headers must be less than 80KB.
+     * Queue-level headers to override headers of all the tasks in the queue.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + public java.util.List + getHeaderOverridesBuilderList() { + return getHeaderOverridesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder> + getHeaderOverridesFieldBuilder() { + if (headerOverridesBuilder_ == null) { + headerOverridesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride.Builder, + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder>( + headerOverrides_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + headerOverrides_ = null; + } + return headerOverridesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OAuthToken, + com.google.cloud.tasks.v2beta3.OAuthToken.Builder, + com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder> + oauthTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + @java.lang.Override + public boolean hasOauthToken() { + return authorizationHeaderCase_ == 5; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OAuthToken getOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 5) { + return oauthTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken(com.google.cloud.tasks.v2beta3.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oauthTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + public Builder setOauthToken( + com.google.cloud.tasks.v2beta3.OAuthToken.Builder builderForValue) { + if (oauthTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oauthTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + public Builder mergeOauthToken(com.google.cloud.tasks.v2beta3.OAuthToken value) { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta3.OAuthToken.newBuilder( + (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 5) { + oauthTokenBuilder_.mergeFrom(value); + } else { + oauthTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 5; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + public Builder clearOauthToken() { + if (oauthTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 5) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oauthTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + public com.google.cloud.tasks.v2beta3.OAuthToken.Builder getOauthTokenBuilder() { + return getOauthTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder getOauthTokenOrBuilder() { + if ((authorizationHeaderCase_ == 5) && (oauthTokenBuilder_ != null)) { + return oauthTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 5) { + return (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+     * will be generated and attached as the `Authorization` header in the HTTP
+     * request.
+     *
+     * This type of authorization should generally only be used when calling
+     * Google APIs hosted on *.googleapis.com.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OAuthToken, + com.google.cloud.tasks.v2beta3.OAuthToken.Builder, + com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder> + getOauthTokenFieldBuilder() { + if (oauthTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 5)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta3.OAuthToken.getDefaultInstance(); + } + oauthTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OAuthToken, + com.google.cloud.tasks.v2beta3.OAuthToken.Builder, + com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder>( + (com.google.cloud.tasks.v2beta3.OAuthToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 5; + onChanged(); + return oauthTokenBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OidcToken, + com.google.cloud.tasks.v2beta3.OidcToken.Builder, + com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder> + oidcTokenBuilder_; + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + @java.lang.Override + public boolean hasOidcToken() { + return authorizationHeaderCase_ == 6; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OidcToken getOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } else { + if (authorizationHeaderCase_ == 6) { + return oidcTokenBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta3.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizationHeader_ = value; + onChanged(); + } else { + oidcTokenBuilder_.setMessage(value); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + public Builder setOidcToken(com.google.cloud.tasks.v2beta3.OidcToken.Builder builderForValue) { + if (oidcTokenBuilder_ == null) { + authorizationHeader_ = builderForValue.build(); + onChanged(); + } else { + oidcTokenBuilder_.setMessage(builderForValue.build()); + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + public Builder mergeOidcToken(com.google.cloud.tasks.v2beta3.OidcToken value) { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6 + && authorizationHeader_ + != com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance()) { + authorizationHeader_ = + com.google.cloud.tasks.v2beta3.OidcToken.newBuilder( + (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_) + .mergeFrom(value) + .buildPartial(); + } else { + authorizationHeader_ = value; + } + onChanged(); + } else { + if (authorizationHeaderCase_ == 6) { + oidcTokenBuilder_.mergeFrom(value); + } else { + oidcTokenBuilder_.setMessage(value); + } + } + authorizationHeaderCase_ = 6; + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + public Builder clearOidcToken() { + if (oidcTokenBuilder_ == null) { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + onChanged(); + } + } else { + if (authorizationHeaderCase_ == 6) { + authorizationHeaderCase_ = 0; + authorizationHeader_ = null; + } + oidcTokenBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + public com.google.cloud.tasks.v2beta3.OidcToken.Builder getOidcTokenBuilder() { + return getOidcTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder getOidcTokenOrBuilder() { + if ((authorizationHeaderCase_ == 6) && (oidcTokenBuilder_ != null)) { + return oidcTokenBuilder_.getMessageOrBuilder(); + } else { + if (authorizationHeaderCase_ == 6) { + return (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_; + } + return com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } + } + /** + * + * + *
+     * If specified, an
+     * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+     * token will be generated and attached as an `Authorization` header in the
+     * HTTP request.
+     *
+     * This type of authorization can be used for many scenarios, including
+     * calling Cloud Run, or endpoints where you intend to validate the token
+     * yourself.
+     * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OidcToken, + com.google.cloud.tasks.v2beta3.OidcToken.Builder, + com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder> + getOidcTokenFieldBuilder() { + if (oidcTokenBuilder_ == null) { + if (!(authorizationHeaderCase_ == 6)) { + authorizationHeader_ = com.google.cloud.tasks.v2beta3.OidcToken.getDefaultInstance(); + } + oidcTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.OidcToken, + com.google.cloud.tasks.v2beta3.OidcToken.Builder, + com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder>( + (com.google.cloud.tasks.v2beta3.OidcToken) authorizationHeader_, + getParentForChildren(), + isClean()); + authorizationHeader_ = null; + } + authorizationHeaderCase_ = 6; + onChanged(); + return oidcTokenBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.HttpTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.HttpTarget) + private static final com.google.cloud.tasks.v2beta3.HttpTarget DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.HttpTarget(); + } + + public static com.google.cloud.tasks.v2beta3.HttpTarget getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTargetOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTargetOrBuilder.java new file mode 100644 index 000000000000..e9743658bf8e --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpTargetOrBuilder.java @@ -0,0 +1,420 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface HttpTargetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.HttpTarget) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return Whether the uriOverride field is set. + */ + boolean hasUriOverride(); + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * + * @return The uriOverride. + */ + com.google.cloud.tasks.v2beta3.UriOverride getUriOverride(); + /** + * + * + *
+   * URI override.
+   *
+   * When specified, overrides the execution URI for all the tasks in the queue.
+   * 
+ * + * .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder getUriOverrideOrBuilder(); + + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The enum numeric value on the wire for httpMethod. + */ + int getHttpMethodValue(); + /** + * + * + *
+   * The HTTP method to use for the request.
+   *
+   * When specified, it overrides
+   * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the
+   * task. Note that if the value is set to [HttpMethod][GET] the
+   * [HttpRequest][body] of the task will be ignored at execution time.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * + * @return The httpMethod. + */ + com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod(); + + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + java.util.List getHeaderOverridesList(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride getHeaderOverrides(int index); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + int getHeaderOverridesCount(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + java.util.List + getHeaderOverridesOrBuilderList(); + /** + * + * + *
+   * HTTP target headers.
+   *
+   * This map contains the header field names and values.
+   * Headers will be set when running the
+   * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or
+   * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
+   *
+   * These headers represent a subset of the headers that will be configured for
+   * the task's HTTP request. Some HTTP request headers will be ignored or
+   * replaced.
+   *
+   * A partial list of headers that will be ignored or replaced is:
+   * * Several predefined headers, prefixed with "X-CloudTasks-", can
+   * be used to define properties of the task.
+   * * Host: This will be computed by Cloud Tasks and derived from
+   * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url].
+   * * Content-Length: This will be computed by Cloud Tasks.
+   *
+   * `Content-Type` won't be set by Cloud Tasks. You can explicitly set
+   * `Content-Type` to a media type when the
+   *  [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   *  For example,`Content-Type` can be set to `"application/octet-stream"` or
+   *  `"application/json"`. The default value is set to "application/json"`.
+   *
+   * * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
+   *
+   * Headers which can have multiple values (according to RFC2616) can be
+   * specified using comma-separated values.
+   *
+   * The size of the headers must be less than 80KB.
+   * Queue-level headers to override headers of all the tasks in the queue.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * + */ + com.google.cloud.tasks.v2beta3.HttpTarget.HeaderOverrideOrBuilder getHeaderOverridesOrBuilder( + int index); + + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return Whether the oauthToken field is set. + */ + boolean hasOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * + * @return The oauthToken. + */ + com.google.cloud.tasks.v2beta3.OAuthToken getOauthToken(); + /** + * + * + *
+   * If specified, an
+   * [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
+   * will be generated and attached as the `Authorization` header in the HTTP
+   * request.
+   *
+   * This type of authorization should generally only be used when calling
+   * Google APIs hosted on *.googleapis.com.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + */ + com.google.cloud.tasks.v2beta3.OAuthTokenOrBuilder getOauthTokenOrBuilder(); + + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return Whether the oidcToken field is set. + */ + boolean hasOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * + * @return The oidcToken. + */ + com.google.cloud.tasks.v2beta3.OidcToken getOidcToken(); + /** + * + * + *
+   * If specified, an
+   * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
+   * token will be generated and attached as an `Authorization` header in the
+   * HTTP request.
+   *
+   * This type of authorization can be used for many scenarios, including
+   * calling Cloud Run, or endpoints where you intend to validate the token
+   * yourself.
+   * 
+ * + * .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + */ + com.google.cloud.tasks.v2beta3.OidcTokenOrBuilder getOidcTokenOrBuilder(); + + com.google.cloud.tasks.v2beta3.HttpTarget.AuthorizationHeaderCase getAuthorizationHeaderCase(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java index 0fa756e23b45..4e10e053117f 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+ * Request message for
+ * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListQueuesRequest} @@ -129,11 +130,10 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -162,11 +162,10 @@ public java.lang.String getFilter() {
    *
    *
    * 
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -203,8 +202,8 @@ public com.google.protobuf.ByteString getFilterBytes() {
    * The maximum page size is 9800. If unspecified, the page size will
    * be the maximum. Fewer queues than requested might be returned,
    * even if more queues exist; use the
-   * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the
-   * response to determine if more queues exist.
+   * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token]
+   * in the response to determine if more queues exist.
    * 
* * int32 page_size = 3; @@ -228,10 +227,12 @@ public int getPageSize() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -258,10 +259,12 @@ public java.lang.String getPageToken() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -287,8 +290,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -306,8 +309,8 @@ public boolean hasReadMask() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -325,8 +328,8 @@ public com.google.protobuf.FieldMask getReadMask() { * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -543,7 +546,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+   * Request message for
+   * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListQueuesRequest} @@ -908,11 +912,10 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -940,11 +943,10 @@ public java.lang.String getFilter() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -972,11 +974,10 @@ public com.google.protobuf.ByteString getFilterBytes() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -1003,11 +1004,10 @@ public Builder setFilter(java.lang.String value) {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -1030,11 +1030,10 @@ public Builder clearFilter() {
      *
      *
      * 
-     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-     * field can be used as a filter and several operators as supported.
-     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-     * described in
-     * [Stackdriver's Advanced Logs
+     * `filter` can be used to specify a subset of queues. Any
+     * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+     * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+     * filter syntax is the same as described in [Stackdriver's Advanced Logs
      * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
      *
      * Sample filter "state: PAUSED".
@@ -1069,8 +1068,8 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
      * The maximum page size is 9800. If unspecified, the page size will
      * be the maximum. Fewer queues than requested might be returned,
      * even if more queues exist; use the
-     * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the
-     * response to determine if more queues exist.
+     * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token]
+     * in the response to determine if more queues exist.
      * 
* * int32 page_size = 3; @@ -1090,8 +1089,8 @@ public int getPageSize() { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the - * response to determine if more queues exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. *
* * int32 page_size = 3; @@ -1115,8 +1114,8 @@ public Builder setPageSize(int value) { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the - * response to determine if more queues exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. *
* * int32 page_size = 3; @@ -1139,10 +1138,12 @@ public Builder clearPageSize() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -1168,10 +1169,12 @@ public java.lang.String getPageToken() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -1197,10 +1200,12 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -1225,10 +1230,12 @@ public Builder setPageToken(java.lang.String value) { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -1249,10 +1256,12 @@ public Builder clearPageToken() { * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -1281,8 +1290,8 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1299,8 +1308,8 @@ public boolean hasReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1321,8 +1330,8 @@ public com.google.protobuf.FieldMask getReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1347,8 +1356,8 @@ public Builder setReadMask(com.google.protobuf.FieldMask value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1370,8 +1379,8 @@ public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1399,8 +1408,8 @@ public Builder mergeReadMask(com.google.protobuf.FieldMask value) { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1422,8 +1431,8 @@ public Builder clearReadMask() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1440,8 +1449,8 @@ public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
@@ -1460,8 +1469,8 @@ public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { * * *
-     * Optional. Read mask is used for a more granular control over what the API returns.
-     * If the mask is not present all fields will be returned except
+     * Optional. Read mask is used for a more granular control over what the API
+     * returns. If the mask is not present all fields will be returned except
      * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
      * specified in the mask.
      * 
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java index 73cfaa4bd39e..e95782aa950e 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java @@ -58,11 +58,10 @@ public interface ListQueuesRequestOrBuilder * * *
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -80,11 +79,10 @@ public interface ListQueuesRequestOrBuilder
    *
    *
    * 
-   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue]
-   * field can be used as a filter and several operators as supported.
-   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
-   * described in
-   * [Stackdriver's Advanced Logs
+   * `filter` can be used to specify a subset of queues. Any
+   * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and
+   * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
+   * filter syntax is the same as described in [Stackdriver's Advanced Logs
    * Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
    *
    * Sample filter "state: PAUSED".
@@ -108,8 +106,8 @@ public interface ListQueuesRequestOrBuilder
    * The maximum page size is 9800. If unspecified, the page size will
    * be the maximum. Fewer queues than requested might be returned,
    * even if more queues exist; use the
-   * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the
-   * response to determine if more queues exist.
+   * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token]
+   * in the response to determine if more queues exist.
    * 
* * int32 page_size = 3; @@ -126,10 +124,12 @@ public interface ListQueuesRequestOrBuilder * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -145,10 +145,12 @@ public interface ListQueuesRequestOrBuilder * * 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - * from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - * method. It is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. *
* * string page_token = 4; @@ -161,8 +163,8 @@ public interface ListQueuesRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -177,8 +179,8 @@ public interface ListQueuesRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
@@ -193,8 +195,8 @@ public interface ListQueuesRequestOrBuilder * * *
-   * Optional. Read mask is used for a more granular control over what the API returns.
-   * If the mask is not present all fields will be returned except
+   * Optional. Read mask is used for a more granular control over what the API
+   * returns. If the mask is not present all fields will be returned except
    * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
    * specified in the mask.
    * 
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponse.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponse.java index 708248f0392f..051d894f030e 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponse.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponse.java @@ -22,7 +22,8 @@ * * *
- * Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+ * Response message for
+ * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListQueuesResponse} @@ -145,7 +146,8 @@ public com.google.cloud.tasks.v2beta3.QueueOrBuilder getQueuesOrBuilder(int inde * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -176,7 +178,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -375,7 +378,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
+   * Response message for
+   * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListQueuesResponse} @@ -971,7 +975,8 @@ public java.util.List getQueuesBui * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1001,7 +1006,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1031,7 +1037,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1060,7 +1067,8 @@ public Builder setNextPageToken(java.lang.String value) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1085,7 +1093,8 @@ public Builder clearNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponseOrBuilder.java index 604de7996995..4da3a243ae20 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponseOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesResponseOrBuilder.java @@ -81,7 +81,8 @@ public interface ListQueuesResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -101,7 +102,8 @@ public interface ListQueuesResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. * * If the next_page_token is empty, there are no more results. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequest.java index 6896e2a327db..4dbe8b433067 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+ * Request message for listing tasks using
+ * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListTasksRequest} @@ -127,18 +128,19 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -153,18 +155,19 @@ public int getResponseViewValue() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -187,8 +190,8 @@ public com.google.cloud.tasks.v2beta3.Task.View getResponseView() { * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - * determine if more tasks exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -215,9 +218,9 @@ public int getPageSize() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -246,9 +249,9 @@ public java.lang.String getPageToken() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -460,7 +463,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+   * Request message for listing tasks using
+   * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListTasksRequest} @@ -806,18 +810,19 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -832,18 +837,19 @@ public int getResponseViewValue() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -861,18 +867,19 @@ public Builder setResponseViewValue(int value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -889,18 +896,19 @@ public com.google.cloud.tasks.v2beta3.Task.View getResponseView() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -921,18 +929,19 @@ public Builder setResponseView(com.google.cloud.tasks.v2beta3.Task.View value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -954,8 +963,8 @@ public Builder clearResponseView() { * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - * determine if more tasks exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -976,8 +985,8 @@ public int getPageSize() { * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - * determine if more tasks exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -1002,8 +1011,8 @@ public Builder setPageSize(int value) { * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - * determine if more tasks exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -1029,9 +1038,9 @@ public Builder clearPageSize() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1059,9 +1068,9 @@ public java.lang.String getPageToken() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1089,9 +1098,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1118,9 +1127,9 @@ public Builder setPageToken(java.lang.String value) { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -1143,9 +1152,9 @@ public Builder clearPageToken() { * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequestOrBuilder.java index 25275ae7475d..7916131a0105 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksRequestOrBuilder.java @@ -58,18 +58,19 @@ public interface ListTasksRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -81,18 +82,19 @@ public interface ListTasksRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -108,8 +110,8 @@ public interface ListTasksRequestOrBuilder * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - * determine if more tasks exist. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -129,9 +131,9 @@ public interface ListTasksRequestOrBuilder * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
@@ -149,9 +151,9 @@ public interface ListTasksRequestOrBuilder * * 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - * from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - * method. + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. * * The page token is valid for only 2 hours. *
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponse.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponse.java index cd8b401ab1a1..476555765275 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponse.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponse.java @@ -22,7 +22,8 @@ * * *
- * Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+ * Response message for listing tasks using
+ * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListTasksResponse} @@ -145,7 +146,8 @@ public com.google.cloud.tasks.v2beta3.TaskOrBuilder getTasksOrBuilder(int index) * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -174,7 +176,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -371,7 +374,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
+   * Response message for listing tasks using
+   * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ListTasksResponse} @@ -967,7 +971,8 @@ public java.util.List getTasksBuild * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -995,7 +1000,8 @@ public java.lang.String getNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1023,7 +1029,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1050,7 +1057,8 @@ public Builder setNextPageToken(java.lang.String value) { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -1073,7 +1081,8 @@ public Builder clearNextPageToken() { * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponseOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponseOrBuilder.java index e8eb58847d6b..8e7d0478b5dd 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponseOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListTasksResponseOrBuilder.java @@ -81,7 +81,8 @@ public interface ListTasksResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. @@ -99,7 +100,8 @@ public interface ListTasksResponseOrBuilder * A token to retrieve next page of results. * * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. * * If the next_page_token is empty, there are no more results. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverride.java new file mode 100644 index 000000000000..1288ff4bcca6 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverride.java @@ -0,0 +1,627 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * PathOverride.
+ *
+ * Path message defines path override for HTTP targets.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.PathOverride} + */ +public final class PathOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.PathOverride) + PathOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use PathOverride.newBuilder() to construct. + private PathOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PathOverride() { + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PathOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PathOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.PathOverride.class, + com.google.cloud.tasks.v2beta3.PathOverride.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object path_ = ""; + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + 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(); + path_ = s; + return s; + } + } + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.PathOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.PathOverride other = + (com.google.cloud.tasks.v2beta3.PathOverride) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.PathOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * PathOverride.
+   *
+   * Path message defines path override for HTTP targets.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.PathOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.PathOverride) + com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PathOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.PathOverride.class, + com.google.cloud.tasks.v2beta3.PathOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.PathOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + path_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverride build() { + com.google.cloud.tasks.v2beta3.PathOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverride buildPartial() { + com.google.cloud.tasks.v2beta3.PathOverride result = + new com.google.cloud.tasks.v2beta3.PathOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.PathOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.path_ = path_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.PathOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta3.PathOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.PathOverride other) { + if (other == com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object path_ = ""; + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + path_ = getDefaultInstance().getPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI path (e.g., /users/1234). Default is an empty string.
+     * 
+ * + * string path = 1; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + path_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.PathOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.PathOverride) + private static final com.google.cloud.tasks.v2beta3.PathOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.PathOverride(); + } + + public static com.google.cloud.tasks.v2beta3.PathOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PathOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverrideOrBuilder.java new file mode 100644 index 000000000000..2571c36c2a59 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PathOverrideOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface PathOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.PathOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+   * The URI path (e.g., /users/1234). Default is an empty string.
+   * 
+ * + * string path = 1; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java index a0111745f292..8ce2177a5cd9 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue].
+ * Request message for
+ * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.PauseQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue].
+   * Request message for
+   * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.PauseQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java index e064571b3aac..774980d94152 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue].
+ * Request message for
+ * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.PurgeQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue].
+   * Request message for
+   * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.PurgeQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverride.java new file mode 100644 index 000000000000..af14d355b867 --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverride.java @@ -0,0 +1,634 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * QueryOverride.
+ *
+ * Query message defines query override for HTTP targets.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.QueryOverride} + */ +public final class QueryOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.QueryOverride) + QueryOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryOverride.newBuilder() to construct. + private QueryOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryOverride() { + queryParams_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_QueryOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.QueryOverride.class, + com.google.cloud.tasks.v2beta3.QueryOverride.Builder.class); + } + + public static final int QUERY_PARAMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object queryParams_ = ""; + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + @java.lang.Override + public java.lang.String getQueryParams() { + java.lang.Object ref = queryParams_; + 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(); + queryParams_ = s; + return s; + } + } + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryParamsBytes() { + java.lang.Object ref = queryParams_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryParams_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryParams_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryParams_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryParams_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryParams_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.QueryOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.QueryOverride other = + (com.google.cloud.tasks.v2beta3.QueryOverride) obj; + + if (!getQueryParams().equals(other.getQueryParams())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getQueryParams().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.QueryOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * QueryOverride.
+   *
+   * Query message defines query override for HTTP targets.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.QueryOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.QueryOverride) + com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_QueryOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.QueryOverride.class, + com.google.cloud.tasks.v2beta3.QueryOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.QueryOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queryParams_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverride build() { + com.google.cloud.tasks.v2beta3.QueryOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverride buildPartial() { + com.google.cloud.tasks.v2beta3.QueryOverride result = + new com.google.cloud.tasks.v2beta3.QueryOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.QueryOverride result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queryParams_ = queryParams_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.QueryOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta3.QueryOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.QueryOverride other) { + if (other == com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance()) return this; + if (!other.getQueryParams().isEmpty()) { + queryParams_ = other.queryParams_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queryParams_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object queryParams_ = ""; + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + public java.lang.String getQueryParams() { + java.lang.Object ref = queryParams_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryParams_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + public com.google.protobuf.ByteString getQueryParamsBytes() { + java.lang.Object ref = queryParams_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryParams_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @param value The queryParams to set. + * @return This builder for chaining. + */ + public Builder setQueryParams(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryParams_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @return This builder for chaining. + */ + public Builder clearQueryParams() { + queryParams_ = getDefaultInstance().getQueryParams(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+     * string.
+     * 
+ * + * string query_params = 1; + * + * @param value The bytes for queryParams to set. + * @return This builder for chaining. + */ + public Builder setQueryParamsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryParams_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.QueryOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.QueryOverride) + private static final com.google.cloud.tasks.v2beta3.QueryOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.QueryOverride(); + } + + public static com.google.cloud.tasks.v2beta3.QueryOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverrideOrBuilder.java new file mode 100644 index 000000000000..2e3cc0da3aaa --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueryOverrideOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface QueryOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.QueryOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The queryParams. + */ + java.lang.String getQueryParams(); + /** + * + * + *
+   * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
+   * string.
+   * 
+ * + * string query_params = 1; + * + * @return The bytes for queryParams. + */ + com.google.protobuf.ByteString getQueryParamsBytes(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java index f42992ff0040..5e0bae39b1ec 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java @@ -645,6 +645,56 @@ public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue getAppEngineHttpQueue() return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance(); } + public static final int HTTP_TARGET_FIELD_NUMBER = 13; + private com.google.cloud.tasks.v2beta3.HttpTarget httpTarget_; + /** + * + * + *
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return Whether the httpTarget field is set. + */ + @java.lang.Override + public boolean hasHttpTarget() { + return httpTarget_ != null; + } + /** + * + * + *
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return The httpTarget. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTarget getHttpTarget() { + return httpTarget_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance() + : httpTarget_; + } + /** + * + * + *
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder getHttpTargetOrBuilder() { + return httpTarget_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance() + : httpTarget_; + } + public static final int RATE_LIMITS_FIELD_NUMBER = 4; private com.google.cloud.tasks.v2beta3.RateLimits rateLimits_; /** @@ -861,7 +911,7 @@ public com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder getRetryConfigOrBuild *
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
    * uploading
@@ -884,7 +934,7 @@ public int getStateValue() {
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
    * uploading
@@ -1351,6 +1401,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (stats_ != null) {
       output.writeMessage(12, getStats());
     }
+    if (httpTarget_ != null) {
+      output.writeMessage(13, getHttpTarget());
+    }
     getUnknownFields().writeTo(output);
   }
 
@@ -1397,6 +1450,9 @@ public int getSerializedSize() {
     if (stats_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStats());
     }
+    if (httpTarget_ != null) {
+      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getHttpTarget());
+    }
     size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
@@ -1413,6 +1469,10 @@ public boolean equals(final java.lang.Object obj) {
     com.google.cloud.tasks.v2beta3.Queue other = (com.google.cloud.tasks.v2beta3.Queue) obj;
 
     if (!getName().equals(other.getName())) return false;
+    if (hasHttpTarget() != other.hasHttpTarget()) return false;
+    if (hasHttpTarget()) {
+      if (!getHttpTarget().equals(other.getHttpTarget())) return false;
+    }
     if (hasRateLimits() != other.hasRateLimits()) return false;
     if (hasRateLimits()) {
       if (!getRateLimits().equals(other.getRateLimits())) return false;
@@ -1464,6 +1524,10 @@ public int hashCode() {
     hash = (19 * hash) + getDescriptor().hashCode();
     hash = (37 * hash) + NAME_FIELD_NUMBER;
     hash = (53 * hash) + getName().hashCode();
+    if (hasHttpTarget()) {
+      hash = (37 * hash) + HTTP_TARGET_FIELD_NUMBER;
+      hash = (53 * hash) + getHttpTarget().hashCode();
+    }
     if (hasRateLimits()) {
       hash = (37 * hash) + RATE_LIMITS_FIELD_NUMBER;
       hash = (53 * hash) + getRateLimits().hashCode();
@@ -1648,6 +1712,11 @@ public Builder clear() {
       if (appEngineHttpQueueBuilder_ != null) {
         appEngineHttpQueueBuilder_.clear();
       }
+      httpTarget_ = null;
+      if (httpTargetBuilder_ != null) {
+        httpTargetBuilder_.dispose();
+        httpTargetBuilder_ = null;
+      }
       rateLimits_ = null;
       if (rateLimitsBuilder_ != null) {
         rateLimitsBuilder_.dispose();
@@ -1727,35 +1796,38 @@ private void buildPartial0(com.google.cloud.tasks.v2beta3.Queue result) {
         result.name_ = name_;
       }
       if (((from_bitField0_ & 0x00000004) != 0)) {
-        result.rateLimits_ = rateLimitsBuilder_ == null ? rateLimits_ : rateLimitsBuilder_.build();
+        result.httpTarget_ = httpTargetBuilder_ == null ? httpTarget_ : httpTargetBuilder_.build();
       }
       if (((from_bitField0_ & 0x00000008) != 0)) {
+        result.rateLimits_ = rateLimitsBuilder_ == null ? rateLimits_ : rateLimitsBuilder_.build();
+      }
+      if (((from_bitField0_ & 0x00000010) != 0)) {
         result.retryConfig_ =
             retryConfigBuilder_ == null ? retryConfig_ : retryConfigBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000010) != 0)) {
+      if (((from_bitField0_ & 0x00000020) != 0)) {
         result.state_ = state_;
       }
-      if (((from_bitField0_ & 0x00000020) != 0)) {
+      if (((from_bitField0_ & 0x00000040) != 0)) {
         result.purgeTime_ = purgeTimeBuilder_ == null ? purgeTime_ : purgeTimeBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000040) != 0)) {
+      if (((from_bitField0_ & 0x00000080) != 0)) {
         result.taskTtl_ = taskTtlBuilder_ == null ? taskTtl_ : taskTtlBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000080) != 0)) {
+      if (((from_bitField0_ & 0x00000100) != 0)) {
         result.tombstoneTtl_ =
             tombstoneTtlBuilder_ == null ? tombstoneTtl_ : tombstoneTtlBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000100) != 0)) {
+      if (((from_bitField0_ & 0x00000200) != 0)) {
         result.stackdriverLoggingConfig_ =
             stackdriverLoggingConfigBuilder_ == null
                 ? stackdriverLoggingConfig_
                 : stackdriverLoggingConfigBuilder_.build();
       }
-      if (((from_bitField0_ & 0x00000200) != 0)) {
+      if (((from_bitField0_ & 0x00000400) != 0)) {
         result.type_ = type_;
       }
-      if (((from_bitField0_ & 0x00000400) != 0)) {
+      if (((from_bitField0_ & 0x00000800) != 0)) {
         result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build();
       }
     }
@@ -1818,6 +1890,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.Queue other) {
         bitField0_ |= 0x00000001;
         onChanged();
       }
+      if (other.hasHttpTarget()) {
+        mergeHttpTarget(other.getHttpTarget());
+      }
       if (other.hasRateLimits()) {
         mergeRateLimits(other.getRateLimits());
       }
@@ -1898,58 +1973,64 @@ public Builder mergeFrom(
             case 34:
               {
                 input.readMessage(getRateLimitsFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000004;
+                bitField0_ |= 0x00000008;
                 break;
               } // case 34
             case 42:
               {
                 input.readMessage(getRetryConfigFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000008;
+                bitField0_ |= 0x00000010;
                 break;
               } // case 42
             case 48:
               {
                 state_ = input.readEnum();
-                bitField0_ |= 0x00000010;
+                bitField0_ |= 0x00000020;
                 break;
               } // case 48
             case 58:
               {
                 input.readMessage(getPurgeTimeFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000020;
+                bitField0_ |= 0x00000040;
                 break;
               } // case 58
             case 66:
               {
                 input.readMessage(getTaskTtlFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000040;
+                bitField0_ |= 0x00000080;
                 break;
               } // case 66
             case 74:
               {
                 input.readMessage(getTombstoneTtlFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000080;
+                bitField0_ |= 0x00000100;
                 break;
               } // case 74
             case 82:
               {
                 input.readMessage(
                     getStackdriverLoggingConfigFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000100;
+                bitField0_ |= 0x00000200;
                 break;
               } // case 82
             case 88:
               {
                 type_ = input.readEnum();
-                bitField0_ |= 0x00000200;
+                bitField0_ |= 0x00000400;
                 break;
               } // case 88
             case 98:
               {
                 input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000400;
+                bitField0_ |= 0x00000800;
                 break;
               } // case 98
+            case 106:
+              {
+                input.readMessage(getHttpTargetFieldBuilder().getBuilder(), extensionRegistry);
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 106
             default:
               {
                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -2433,6 +2514,190 @@ public Builder clearAppEngineHttpQueue() {
       return appEngineHttpQueueBuilder_;
     }
 
+    private com.google.cloud.tasks.v2beta3.HttpTarget httpTarget_;
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.tasks.v2beta3.HttpTarget,
+            com.google.cloud.tasks.v2beta3.HttpTarget.Builder,
+            com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder>
+        httpTargetBuilder_;
+    /**
+     *
+     *
+     * 
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return Whether the httpTarget field is set. + */ + public boolean hasHttpTarget() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return The httpTarget. + */ + public com.google.cloud.tasks.v2beta3.HttpTarget getHttpTarget() { + if (httpTargetBuilder_ == null) { + return httpTarget_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance() + : httpTarget_; + } else { + return httpTargetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public Builder setHttpTarget(com.google.cloud.tasks.v2beta3.HttpTarget value) { + if (httpTargetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + httpTarget_ = value; + } else { + httpTargetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public Builder setHttpTarget( + com.google.cloud.tasks.v2beta3.HttpTarget.Builder builderForValue) { + if (httpTargetBuilder_ == null) { + httpTarget_ = builderForValue.build(); + } else { + httpTargetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public Builder mergeHttpTarget(com.google.cloud.tasks.v2beta3.HttpTarget value) { + if (httpTargetBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && httpTarget_ != null + && httpTarget_ != com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance()) { + getHttpTargetBuilder().mergeFrom(value); + } else { + httpTarget_ = value; + } + } else { + httpTargetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public Builder clearHttpTarget() { + bitField0_ = (bitField0_ & ~0x00000004); + httpTarget_ = null; + if (httpTargetBuilder_ != null) { + httpTargetBuilder_.dispose(); + httpTargetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public com.google.cloud.tasks.v2beta3.HttpTarget.Builder getHttpTargetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHttpTargetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + public com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder getHttpTargetOrBuilder() { + if (httpTargetBuilder_ != null) { + return httpTargetBuilder_.getMessageOrBuilder(); + } else { + return httpTarget_ == null + ? com.google.cloud.tasks.v2beta3.HttpTarget.getDefaultInstance() + : httpTarget_; + } + } + /** + * + * + *
+     * Modifies HTTP target for HTTP tasks.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget, + com.google.cloud.tasks.v2beta3.HttpTarget.Builder, + com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder> + getHttpTargetFieldBuilder() { + if (httpTargetBuilder_ == null) { + httpTargetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpTarget, + com.google.cloud.tasks.v2beta3.HttpTarget.Builder, + com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder>( + getHttpTarget(), getParentForChildren(), isClean()); + httpTarget_ = null; + } + return httpTargetBuilder_; + } + private com.google.cloud.tasks.v2beta3.RateLimits rateLimits_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.tasks.v2beta3.RateLimits, @@ -2478,7 +2743,7 @@ public Builder clearAppEngineHttpQueue() { * @return Whether the rateLimits field is set. */ public boolean hasRateLimits() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -2572,7 +2837,7 @@ public Builder setRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) { } else { rateLimitsBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2619,7 +2884,7 @@ public Builder setRateLimits( } else { rateLimitsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2661,7 +2926,7 @@ public Builder setRateLimits( */ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) { if (rateLimitsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && rateLimits_ != null && rateLimits_ != com.google.cloud.tasks.v2beta3.RateLimits.getDefaultInstance()) { getRateLimitsBuilder().mergeFrom(value); @@ -2671,7 +2936,7 @@ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) } else { rateLimitsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2712,7 +2977,7 @@ public Builder mergeRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) * .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; */ public Builder clearRateLimits() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); rateLimits_ = null; if (rateLimitsBuilder_ != null) { rateLimitsBuilder_.dispose(); @@ -2758,7 +3023,7 @@ public Builder clearRateLimits() { * .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; */ public com.google.cloud.tasks.v2beta3.RateLimits.Builder getRateLimitsBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getRateLimitsFieldBuilder().getBuilder(); } @@ -2887,7 +3152,7 @@ public com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder getRateLimitsOrBuilder * @return Whether the retryConfig field is set. */ public boolean hasRetryConfig() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2945,7 +3210,7 @@ public Builder setRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value) } else { retryConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2974,7 +3239,7 @@ public Builder setRetryConfig( } else { retryConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2998,7 +3263,7 @@ public Builder setRetryConfig( */ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value) { if (retryConfigBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && retryConfig_ != null && retryConfig_ != com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance()) { getRetryConfigBuilder().mergeFrom(value); @@ -3008,7 +3273,7 @@ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value } else { retryConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3031,7 +3296,7 @@ public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value * .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; */ public Builder clearRetryConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); retryConfig_ = null; if (retryConfigBuilder_ != null) { retryConfigBuilder_.dispose(); @@ -3059,7 +3324,7 @@ public Builder clearRetryConfig() { * .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; */ public com.google.cloud.tasks.v2beta3.RetryConfig.Builder getRetryConfigBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getRetryConfigFieldBuilder().getBuilder(); } @@ -3132,7 +3397,7 @@ public com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder getRetryConfigOrBuild *
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
      * uploading
@@ -3155,7 +3420,7 @@ public int getStateValue() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
      * uploading
@@ -3171,7 +3436,7 @@ public int getStateValue() {
      */
     public Builder setStateValue(int value) {
       state_ = value;
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000020;
       onChanged();
       return this;
     }
@@ -3181,7 +3446,7 @@ public Builder setStateValue(int value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
      * uploading
@@ -3206,7 +3471,7 @@ public com.google.cloud.tasks.v2beta3.Queue.State getState() {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
      * uploading
@@ -3224,7 +3489,7 @@ public Builder setState(com.google.cloud.tasks.v2beta3.Queue.State value) {
       if (value == null) {
         throw new NullPointerException();
       }
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000020;
       state_ = value.getNumber();
       onChanged();
       return this;
@@ -3235,7 +3500,7 @@ public Builder setState(com.google.cloud.tasks.v2beta3.Queue.State value) {
      * 
      * Output only. The state of the queue.
      *
-     * `state` can only be changed by calling
+     * `state` can only be changed by called
      * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
      * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
      * uploading
@@ -3249,7 +3514,7 @@ public Builder setState(com.google.cloud.tasks.v2beta3.Queue.State value) {
      * @return This builder for chaining.
      */
     public Builder clearState() {
-      bitField0_ = (bitField0_ & ~0x00000010);
+      bitField0_ = (bitField0_ & ~0x00000020);
       state_ = 0;
       onChanged();
       return this;
@@ -3284,7 +3549,7 @@ public Builder clearState() {
      * @return Whether the purgeTime field is set.
      */
     public boolean hasPurgeTime() {
-      return ((bitField0_ & 0x00000020) != 0);
+      return ((bitField0_ & 0x00000040) != 0);
     }
     /**
      *
@@ -3344,7 +3609,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp value) {
       } else {
         purgeTimeBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3374,7 +3639,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValu
       } else {
         purgeTimeBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3400,7 +3665,7 @@ public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValu
      */
     public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
       if (purgeTimeBuilder_ == null) {
-        if (((bitField0_ & 0x00000020) != 0)
+        if (((bitField0_ & 0x00000040) != 0)
             && purgeTime_ != null
             && purgeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
           getPurgeTimeBuilder().mergeFrom(value);
@@ -3410,7 +3675,7 @@ public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
       } else {
         purgeTimeBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3435,7 +3700,7 @@ public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
      * .google.protobuf.Timestamp purge_time = 7;
      */
     public Builder clearPurgeTime() {
-      bitField0_ = (bitField0_ & ~0x00000020);
+      bitField0_ = (bitField0_ & ~0x00000040);
       purgeTime_ = null;
       if (purgeTimeBuilder_ != null) {
         purgeTimeBuilder_.dispose();
@@ -3465,7 +3730,7 @@ public Builder clearPurgeTime() {
      * .google.protobuf.Timestamp purge_time = 7;
      */
     public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() {
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000040;
       onChanged();
       return getPurgeTimeFieldBuilder().getBuilder();
     }
@@ -3562,7 +3827,7 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() {
      * @return Whether the taskTtl field is set.
      */
     public boolean hasTaskTtl() {
-      return ((bitField0_ & 0x00000040) != 0);
+      return ((bitField0_ & 0x00000080) != 0);
     }
     /**
      *
@@ -3622,7 +3887,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration value) {
       } else {
         taskTtlBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3652,7 +3917,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue)
       } else {
         taskTtlBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3678,7 +3943,7 @@ public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue)
      */
     public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
       if (taskTtlBuilder_ == null) {
-        if (((bitField0_ & 0x00000040) != 0)
+        if (((bitField0_ & 0x00000080) != 0)
             && taskTtl_ != null
             && taskTtl_ != com.google.protobuf.Duration.getDefaultInstance()) {
           getTaskTtlBuilder().mergeFrom(value);
@@ -3688,7 +3953,7 @@ public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
       } else {
         taskTtlBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return this;
     }
@@ -3713,7 +3978,7 @@ public Builder mergeTaskTtl(com.google.protobuf.Duration value) {
      * .google.protobuf.Duration task_ttl = 8;
      */
     public Builder clearTaskTtl() {
-      bitField0_ = (bitField0_ & ~0x00000040);
+      bitField0_ = (bitField0_ & ~0x00000080);
       taskTtl_ = null;
       if (taskTtlBuilder_ != null) {
         taskTtlBuilder_.dispose();
@@ -3743,7 +4008,7 @@ public Builder clearTaskTtl() {
      * .google.protobuf.Duration task_ttl = 8;
      */
     public com.google.protobuf.Duration.Builder getTaskTtlBuilder() {
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000080;
       onChanged();
       return getTaskTtlFieldBuilder().getBuilder();
     }
@@ -3838,7 +4103,7 @@ public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() {
      * @return Whether the tombstoneTtl field is set.
      */
     public boolean hasTombstoneTtl() {
-      return ((bitField0_ & 0x00000080) != 0);
+      return ((bitField0_ & 0x00000100) != 0);
     }
     /**
      *
@@ -3896,7 +4161,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration value) {
       } else {
         tombstoneTtlBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3924,7 +4189,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForVa
       } else {
         tombstoneTtlBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3948,7 +4213,7 @@ public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForVa
      */
     public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
       if (tombstoneTtlBuilder_ == null) {
-        if (((bitField0_ & 0x00000080) != 0)
+        if (((bitField0_ & 0x00000100) != 0)
             && tombstoneTtl_ != null
             && tombstoneTtl_ != com.google.protobuf.Duration.getDefaultInstance()) {
           getTombstoneTtlBuilder().mergeFrom(value);
@@ -3958,7 +4223,7 @@ public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
       } else {
         tombstoneTtlBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return this;
     }
@@ -3981,7 +4246,7 @@ public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) {
      * .google.protobuf.Duration tombstone_ttl = 9;
      */
     public Builder clearTombstoneTtl() {
-      bitField0_ = (bitField0_ & ~0x00000080);
+      bitField0_ = (bitField0_ & ~0x00000100);
       tombstoneTtl_ = null;
       if (tombstoneTtlBuilder_ != null) {
         tombstoneTtlBuilder_.dispose();
@@ -4009,7 +4274,7 @@ public Builder clearTombstoneTtl() {
      * .google.protobuf.Duration tombstone_ttl = 9;
      */
     public com.google.protobuf.Duration.Builder getTombstoneTtlBuilder() {
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000100;
       onChanged();
       return getTombstoneTtlFieldBuilder().getBuilder();
     }
@@ -4096,7 +4361,7 @@ public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() {
      * @return Whether the stackdriverLoggingConfig field is set.
      */
     public boolean hasStackdriverLoggingConfig() {
-      return ((bitField0_ & 0x00000100) != 0);
+      return ((bitField0_ & 0x00000200) != 0);
     }
     /**
      *
@@ -4143,7 +4408,7 @@ public Builder setStackdriverLoggingConfig(
       } else {
         stackdriverLoggingConfigBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -4166,7 +4431,7 @@ public Builder setStackdriverLoggingConfig(
       } else {
         stackdriverLoggingConfigBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -4185,7 +4450,7 @@ public Builder setStackdriverLoggingConfig(
     public Builder mergeStackdriverLoggingConfig(
         com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig value) {
       if (stackdriverLoggingConfigBuilder_ == null) {
-        if (((bitField0_ & 0x00000100) != 0)
+        if (((bitField0_ & 0x00000200) != 0)
             && stackdriverLoggingConfig_ != null
             && stackdriverLoggingConfig_
                 != com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig.getDefaultInstance()) {
@@ -4196,7 +4461,7 @@ public Builder mergeStackdriverLoggingConfig(
       } else {
         stackdriverLoggingConfigBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -4213,7 +4478,7 @@ public Builder mergeStackdriverLoggingConfig(
      * 
      */
     public Builder clearStackdriverLoggingConfig() {
-      bitField0_ = (bitField0_ & ~0x00000100);
+      bitField0_ = (bitField0_ & ~0x00000200);
       stackdriverLoggingConfig_ = null;
       if (stackdriverLoggingConfigBuilder_ != null) {
         stackdriverLoggingConfigBuilder_.dispose();
@@ -4236,7 +4501,7 @@ public Builder clearStackdriverLoggingConfig() {
      */
     public com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig.Builder
         getStackdriverLoggingConfigBuilder() {
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000200;
       onChanged();
       return getStackdriverLoggingConfigFieldBuilder().getBuilder();
     }
@@ -4333,7 +4598,7 @@ public int getTypeValue() {
      */
     public Builder setTypeValue(int value) {
       type_ = value;
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -4382,7 +4647,7 @@ public Builder setType(com.google.cloud.tasks.v2beta3.Queue.Type value) {
       if (value == null) {
         throw new NullPointerException();
       }
-      bitField0_ |= 0x00000200;
+      bitField0_ |= 0x00000400;
       type_ = value.getNumber();
       onChanged();
       return this;
@@ -4405,7 +4670,7 @@ public Builder setType(com.google.cloud.tasks.v2beta3.Queue.Type value) {
      * @return This builder for chaining.
      */
     public Builder clearType() {
-      bitField0_ = (bitField0_ & ~0x00000200);
+      bitField0_ = (bitField0_ & ~0x00000400);
       type_ = 0;
       onChanged();
       return this;
@@ -4433,7 +4698,7 @@ public Builder clearType() {
      * @return Whether the stats field is set.
      */
     public boolean hasStats() {
-      return ((bitField0_ & 0x00000400) != 0);
+      return ((bitField0_ & 0x00000800) != 0);
     }
     /**
      *
@@ -4481,7 +4746,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta3.QueueStats value) {
       } else {
         statsBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000800;
       onChanged();
       return this;
     }
@@ -4504,7 +4769,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta3.QueueStats.Builder builde
       } else {
         statsBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000800;
       onChanged();
       return this;
     }
@@ -4523,7 +4788,7 @@ public Builder setStats(com.google.cloud.tasks.v2beta3.QueueStats.Builder builde
      */
     public Builder mergeStats(com.google.cloud.tasks.v2beta3.QueueStats value) {
       if (statsBuilder_ == null) {
-        if (((bitField0_ & 0x00000400) != 0)
+        if (((bitField0_ & 0x00000800) != 0)
             && stats_ != null
             && stats_ != com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance()) {
           getStatsBuilder().mergeFrom(value);
@@ -4533,7 +4798,7 @@ public Builder mergeStats(com.google.cloud.tasks.v2beta3.QueueStats value) {
       } else {
         statsBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000800;
       onChanged();
       return this;
     }
@@ -4551,7 +4816,7 @@ public Builder mergeStats(com.google.cloud.tasks.v2beta3.QueueStats value) {
      * 
      */
     public Builder clearStats() {
-      bitField0_ = (bitField0_ & ~0x00000400);
+      bitField0_ = (bitField0_ & ~0x00000800);
       stats_ = null;
       if (statsBuilder_ != null) {
         statsBuilder_.dispose();
@@ -4574,7 +4839,7 @@ public Builder clearStats() {
      * 
      */
     public com.google.cloud.tasks.v2beta3.QueueStats.Builder getStatsBuilder() {
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000800;
       onChanged();
       return getStatsFieldBuilder().getBuilder();
     }
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java
index bea9664ab487..172db537801f 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java
@@ -133,6 +133,41 @@ public interface QueueOrBuilder
    */
   com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder getAppEngineHttpQueueOrBuilder();
 
+  /**
+   *
+   *
+   * 
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return Whether the httpTarget field is set. + */ + boolean hasHttpTarget(); + /** + * + * + *
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * + * @return The httpTarget. + */ + com.google.cloud.tasks.v2beta3.HttpTarget getHttpTarget(); + /** + * + * + *
+   * Modifies HTTP target for HTTP tasks.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + com.google.cloud.tasks.v2beta3.HttpTargetOrBuilder getHttpTargetOrBuilder(); + /** * * @@ -317,7 +352,7 @@ public interface QueueOrBuilder *
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
    * uploading
@@ -337,7 +372,7 @@ public interface QueueOrBuilder
    * 
    * Output only. The state of the queue.
    *
-   * `state` can only be changed by calling
+   * `state` can only be changed by called
    * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
    * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
    * uploading
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java
index 81b3bb5e385a..77110e815034 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java
@@ -61,47 +61,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "/field_behavior.proto\032\031google/api/resour"
           + "ce.proto\032\'google/cloud/tasks/v2beta3/tar"
           + "get.proto\032\036google/protobuf/duration.prot"
-          + "o\032\037google/protobuf/timestamp.proto\"\341\006\n\005Q"
+          + "o\032\037google/protobuf/timestamp.proto\"\236\007\n\005Q"
           + "ueue\022\014\n\004name\030\001 \001(\t\022O\n\025app_engine_http_qu"
           + "eue\030\003 \001(\0132..google.cloud.tasks.v2beta3.A"
-          + "ppEngineHttpQueueH\000\022;\n\013rate_limits\030\004 \001(\013"
-          + "2&.google.cloud.tasks.v2beta3.RateLimits"
-          + "\022=\n\014retry_config\030\005 \001(\0132\'.google.cloud.ta"
-          + "sks.v2beta3.RetryConfig\0226\n\005state\030\006 \001(\0162\'"
-          + ".google.cloud.tasks.v2beta3.Queue.State\022"
-          + ".\n\npurge_time\030\007 \001(\0132\032.google.protobuf.Ti"
-          + "mestamp\022+\n\010task_ttl\030\010 \001(\0132\031.google.proto"
-          + "buf.Duration\0220\n\rtombstone_ttl\030\t \001(\0132\031.go"
-          + "ogle.protobuf.Duration\022X\n\032stackdriver_lo"
-          + "gging_config\030\n \001(\01324.google.cloud.tasks."
-          + "v2beta3.StackdriverLoggingConfig\022:\n\004type"
-          + "\030\013 \001(\0162&.google.cloud.tasks.v2beta3.Queu"
-          + "e.TypeB\004\342A\001\005\022;\n\005stats\030\014 \001(\0132&.google.clo"
-          + "ud.tasks.v2beta3.QueueStatsB\004\342A\001\003\"E\n\005Sta"
-          + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n"
-          + "\n\006PAUSED\020\002\022\014\n\010DISABLED\020\003\"0\n\004Type\022\024\n\020TYPE"
-          + "_UNSPECIFIED\020\000\022\010\n\004PULL\020\001\022\010\n\004PUSH\020\002:\\\352AY\n"
-          + "\037cloudtasks.googleapis.com/Queue\0226projec"
-          + "ts/{project}/locations/{location}/queues"
-          + "/{queue}B\014\n\nqueue_type\"j\n\nRateLimits\022!\n\031"
-          + "max_dispatches_per_second\030\001 \001(\001\022\026\n\016max_b"
-          + "urst_size\030\002 \001(\005\022!\n\031max_concurrent_dispat"
-          + "ches\030\003 \001(\005\"\321\001\n\013RetryConfig\022\024\n\014max_attemp"
-          + "ts\030\001 \001(\005\0225\n\022max_retry_duration\030\002 \001(\0132\031.g"
-          + "oogle.protobuf.Duration\022.\n\013min_backoff\030\003"
-          + " \001(\0132\031.google.protobuf.Duration\022.\n\013max_b"
-          + "ackoff\030\004 \001(\0132\031.google.protobuf.Duration\022"
-          + "\025\n\rmax_doublings\030\005 \001(\005\"2\n\030StackdriverLog"
-          + "gingConfig\022\026\n\016sampling_ratio\030\001 \001(\001\"\355\001\n\nQ"
-          + "ueueStats\022\031\n\013tasks_count\030\001 \001(\003B\004\342A\001\003\022G\n\035"
-          + "oldest_estimated_arrival_time\030\002 \001(\0132\032.go"
-          + "ogle.protobuf.TimestampB\004\342A\001\003\022(\n\032execute"
-          + "d_last_minute_count\030\003 \001(\003B\004\342A\001\003\022)\n\033concu"
-          + "rrent_dispatches_count\030\004 \001(\003B\004\342A\001\003\022&\n\030ef"
-          + "fective_execution_rate\030\005 \001(\001B\004\342A\001\003Bs\n\036co"
-          + "m.google.cloud.tasks.v2beta3B\nQueueProto"
-          + "P\001ZCcloud.google.com/go/cloudtasks/apiv2"
-          + "beta3/cloudtaskspb;cloudtaskspbb\006proto3"
+          + "ppEngineHttpQueueH\000\022;\n\013http_target\030\r \001(\013"
+          + "2&.google.cloud.tasks.v2beta3.HttpTarget"
+          + "\022;\n\013rate_limits\030\004 \001(\0132&.google.cloud.tas"
+          + "ks.v2beta3.RateLimits\022=\n\014retry_config\030\005 "
+          + "\001(\0132\'.google.cloud.tasks.v2beta3.RetryCo"
+          + "nfig\0226\n\005state\030\006 \001(\0162\'.google.cloud.tasks"
+          + ".v2beta3.Queue.State\022.\n\npurge_time\030\007 \001(\013"
+          + "2\032.google.protobuf.Timestamp\022+\n\010task_ttl"
+          + "\030\010 \001(\0132\031.google.protobuf.Duration\0220\n\rtom"
+          + "bstone_ttl\030\t \001(\0132\031.google.protobuf.Durat"
+          + "ion\022X\n\032stackdriver_logging_config\030\n \001(\0132"
+          + "4.google.cloud.tasks.v2beta3.Stackdriver"
+          + "LoggingConfig\022:\n\004type\030\013 \001(\0162&.google.clo"
+          + "ud.tasks.v2beta3.Queue.TypeB\004\342A\001\005\022;\n\005sta"
+          + "ts\030\014 \001(\0132&.google.cloud.tasks.v2beta3.Qu"
+          + "eueStatsB\004\342A\001\003\"E\n\005State\022\025\n\021STATE_UNSPECI"
+          + "FIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISAB"
+          + "LED\020\003\"0\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004P"
+          + "ULL\020\001\022\010\n\004PUSH\020\002:\\\352AY\n\037cloudtasks.googlea"
+          + "pis.com/Queue\0226projects/{project}/locati"
+          + "ons/{location}/queues/{queue}B\014\n\nqueue_t"
+          + "ype\"j\n\nRateLimits\022!\n\031max_dispatches_per_"
+          + "second\030\001 \001(\001\022\026\n\016max_burst_size\030\002 \001(\005\022!\n\031"
+          + "max_concurrent_dispatches\030\003 \001(\005\"\321\001\n\013Retr"
+          + "yConfig\022\024\n\014max_attempts\030\001 \001(\005\0225\n\022max_ret"
+          + "ry_duration\030\002 \001(\0132\031.google.protobuf.Dura"
+          + "tion\022.\n\013min_backoff\030\003 \001(\0132\031.google.proto"
+          + "buf.Duration\022.\n\013max_backoff\030\004 \001(\0132\031.goog"
+          + "le.protobuf.Duration\022\025\n\rmax_doublings\030\005 "
+          + "\001(\005\"2\n\030StackdriverLoggingConfig\022\026\n\016sampl"
+          + "ing_ratio\030\001 \001(\001\"\355\001\n\nQueueStats\022\031\n\013tasks_"
+          + "count\030\001 \001(\003B\004\342A\001\003\022G\n\035oldest_estimated_ar"
+          + "rival_time\030\002 \001(\0132\032.google.protobuf.Times"
+          + "tampB\004\342A\001\003\022(\n\032executed_last_minute_count"
+          + "\030\003 \001(\003B\004\342A\001\003\022)\n\033concurrent_dispatches_co"
+          + "unt\030\004 \001(\003B\004\342A\001\003\022&\n\030effective_execution_r"
+          + "ate\030\005 \001(\001B\004\342A\001\003Bs\n\036com.google.cloud.task"
+          + "s.v2beta3B\nQueueProtoP\001ZCcloud.google.co"
+          + "m/go/cloudtasks/apiv2beta3/cloudtaskspb;"
+          + "cloudtaskspbb\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -121,6 +123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "Name",
               "AppEngineHttpQueue",
+              "HttpTarget",
               "RateLimits",
               "RetryConfig",
               "State",
diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java
index 8012b220d8b0..f169f9831417 100644
--- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java
+++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java
@@ -22,7 +22,8 @@
  *
  *
  * 
- * Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue].
+ * Request message for
+ * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ResumeQueueRequest} @@ -282,7 +283,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue].
+   * Request message for
+   * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.ResumeQueueRequest} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequest.java index 41b892438fea..8252d4a0ad16 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequest.java @@ -127,18 +127,19 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -153,18 +154,19 @@ public int getResponseViewValue() { * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
    *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
    *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -668,18 +670,19 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -694,18 +697,19 @@ public int getResponseViewValue() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -723,18 +727,19 @@ public Builder setResponseViewValue(int value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -751,18 +756,19 @@ public com.google.cloud.tasks.v2beta3.Task.View getResponseView() { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -783,18 +789,19 @@ public Builder setResponseView(com.google.cloud.tasks.v2beta3.Task.View value) { * * *
-     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-     * returned.
-     *
-     * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-     * information is retrieved by default because some data, such as
-     * payloads, might be desirable to return only when needed because
-     * of its large size or because of the sensitivity of data that it
-     * contains.
-     *
-     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-     * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+     * The response_view specifies which subset of the
+     * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+     *
+     * By default response_view is
+     * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+     * retrieved by default because some data, such as payloads, might be
+     * desirable to return only when needed because of its large size or because
+     * of the sensitivity of data that it contains.
+     *
+     * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+     * requires `cloudtasks.tasks.fullView` [Google
+     * IAM](https://cloud.google.com/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta3.Task] resource.
      * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequestOrBuilder.java index ed743a704ddc..782dfc2053bb 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RunTaskRequestOrBuilder.java @@ -58,18 +58,19 @@ public interface RunTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; @@ -81,18 +82,19 @@ public interface RunTaskRequestOrBuilder * * *
-   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be
-   * returned.
-   *
-   * By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all
-   * information is retrieved by default because some data, such as
-   * payloads, might be desirable to return only when needed because
-   * of its large size or because of the sensitivity of data that it
-   * contains.
-   *
-   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
-   * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
-   * permission on the [Task][google.cloud.tasks.v2beta3.Task] resource.
+   * The response_view specifies which subset of the
+   * [Task][google.cloud.tasks.v2beta3.Task] will be returned.
+   *
+   * By default response_view is
+   * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is
+   * retrieved by default because some data, such as payloads, might be
+   * desirable to return only when needed because of its large size or because
+   * of the sensitivity of data that it contains.
+   *
+   * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL]
+   * requires `cloudtasks.tasks.fullView` [Google
+   * IAM](https://cloud.google.com/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta3.Task] resource.
    * 
* * .google.cloud.tasks.v2beta3.Task.View response_view = 2; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java index b7c425df9b9d..a17484024474 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java @@ -31,6 +31,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta3_PullMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_PathOverride_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_QueryOverride_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_UriOverride_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_HttpTarget_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -74,39 +98,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\'google/cloud/tasks/v2beta3/target.prot" + "o\022\032google.cloud.tasks.v2beta3\"+\n\013PullMes" - + "sage\022\017\n\007payload\030\001 \001(\014\022\013\n\003tag\030\002 \001(\t\"\360\002\n\013H" - + "ttpRequest\022\013\n\003url\030\001 \001(\t\022;\n\013http_method\030\002" - + " \001(\0162&.google.cloud.tasks.v2beta3.HttpMe" - + "thod\022E\n\007headers\030\003 \003(\01324.google.cloud.tas" - + "ks.v2beta3.HttpRequest.HeadersEntry\022\014\n\004b" - + "ody\030\004 \001(\014\022=\n\013oauth_token\030\005 \001(\0132&.google." - + "cloud.tasks.v2beta3.OAuthTokenH\000\022;\n\noidc" - + "_token\030\006 \001(\0132%.google.cloud.tasks.v2beta" - + "3.OidcTokenH\000\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\026\n\024authorization_h" - + "eader\"g\n\022AppEngineHttpQueue\022Q\n\033app_engin" - + "e_routing_override\030\001 \001(\0132,.google.cloud." - + "tasks.v2beta3.AppEngineRouting\"\301\002\n\024AppEn" - + "gineHttpRequest\022;\n\013http_method\030\001 \001(\0162&.g" - + "oogle.cloud.tasks.v2beta3.HttpMethod\022H\n\022" - + "app_engine_routing\030\002 \001(\0132,.google.cloud." - + "tasks.v2beta3.AppEngineRouting\022\024\n\014relati" - + "ve_uri\030\003 \001(\t\022N\n\007headers\030\004 \003(\0132=.google.c" - + "loud.tasks.v2beta3.AppEngineHttpRequest." - + "HeadersEntry\022\014\n\004body\030\005 \001(\014\032.\n\014HeadersEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020Ap" - + "pEngineRouting\022\017\n\007service\030\001 \001(\t\022\017\n\007versi" - + "on\030\002 \001(\t\022\020\n\010instance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t" - + "\":\n\nOAuthToken\022\035\n\025service_account_email\030" - + "\001 \001(\t\022\r\n\005scope\030\002 \001(\t\"<\n\tOidcToken\022\035\n\025ser" - + "vice_account_email\030\001 \001(\t\022\020\n\010audience\030\002 \001" - + "(\t*s\n\nHttpMethod\022\033\n\027HTTP_METHOD_UNSPECIF" - + "IED\020\000\022\010\n\004POST\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003PU" - + "T\020\004\022\n\n\006DELETE\020\005\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020\007B" - + "t\n\036com.google.cloud.tasks.v2beta3B\013Targe" - + "tProtoP\001ZCcloud.google.com/go/cloudtasks" - + "/apiv2beta3/cloudtaskspb;cloudtaskspbb\006p" - + "roto3" + + "sage\022\017\n\007payload\030\001 \001(\014\022\013\n\003tag\030\002 \001(\t\"\034\n\014Pa" + + "thOverride\022\014\n\004path\030\001 \001(\t\"%\n\rQueryOverrid" + + "e\022\024\n\014query_params\030\001 \001(\t\"\227\004\n\013UriOverride\022" + + "C\n\006scheme\030\001 \001(\0162..google.cloud.tasks.v2b" + + "eta3.UriOverride.SchemeH\000\210\001\001\022\021\n\004host\030\002 \001" + + "(\tH\001\210\001\001\022\021\n\004port\030\003 \001(\003H\002\210\001\001\022?\n\rpath_overr" + + "ide\030\004 \001(\0132(.google.cloud.tasks.v2beta3.P" + + "athOverride\022A\n\016query_override\030\005 \001(\0132).go" + + "ogle.cloud.tasks.v2beta3.QueryOverride\022a" + + "\n\031uri_override_enforce_mode\030\006 \001(\0162>.goog" + + "le.cloud.tasks.v2beta3.UriOverride.UriOv" + + "errideEnforceMode\"5\n\006Scheme\022\026\n\022SCHEME_UN" + + "SPECIFIED\020\000\022\010\n\004HTTP\020\001\022\t\n\005HTTPS\020\002\"b\n\026UriO" + + "verrideEnforceMode\022)\n%URI_OVERRIDE_ENFOR" + + "CE_MODE_UNSPECIFIED\020\000\022\021\n\rIF_NOT_EXISTS\020\001" + + "\022\n\n\006ALWAYS\020\002B\t\n\007_schemeB\007\n\005_hostB\007\n\005_por" + + "t\"\344\003\n\nHttpTarget\022=\n\014uri_override\030\001 \001(\0132\'" + + ".google.cloud.tasks.v2beta3.UriOverride\022" + + ";\n\013http_method\030\002 \001(\0162&.google.cloud.task" + + "s.v2beta3.HttpMethod\022O\n\020header_overrides" + + "\030\003 \003(\01325.google.cloud.tasks.v2beta3.Http" + + "Target.HeaderOverride\022=\n\013oauth_token\030\005 \001" + + "(\0132&.google.cloud.tasks.v2beta3.OAuthTok" + + "enH\000\022;\n\noidc_token\030\006 \001(\0132%.google.cloud." + + "tasks.v2beta3.OidcTokenH\000\032$\n\006Header\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\032O\n\016HeaderOverrid" + + "e\022=\n\006header\030\001 \001(\0132-.google.cloud.tasks.v" + + "2beta3.HttpTarget.HeaderB\026\n\024authorizatio" + + "n_header\"\360\002\n\013HttpRequest\022\013\n\003url\030\001 \001(\t\022;\n" + + "\013http_method\030\002 \001(\0162&.google.cloud.tasks." + + "v2beta3.HttpMethod\022E\n\007headers\030\003 \003(\01324.go" + + "ogle.cloud.tasks.v2beta3.HttpRequest.Hea" + + "dersEntry\022\014\n\004body\030\004 \001(\014\022=\n\013oauth_token\030\005" + + " \001(\0132&.google.cloud.tasks.v2beta3.OAuthT" + + "okenH\000\022;\n\noidc_token\030\006 \001(\0132%.google.clou" + + "d.tasks.v2beta3.OidcTokenH\000\032.\n\014HeadersEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\026\n\024a" + + "uthorization_header\"g\n\022AppEngineHttpQueu" + + "e\022Q\n\033app_engine_routing_override\030\001 \001(\0132," + + ".google.cloud.tasks.v2beta3.AppEngineRou" + + "ting\"\301\002\n\024AppEngineHttpRequest\022;\n\013http_me" + + "thod\030\001 \001(\0162&.google.cloud.tasks.v2beta3." + + "HttpMethod\022H\n\022app_engine_routing\030\002 \001(\0132," + + ".google.cloud.tasks.v2beta3.AppEngineRou" + + "ting\022\024\n\014relative_uri\030\003 \001(\t\022N\n\007headers\030\004 " + + "\003(\0132=.google.cloud.tasks.v2beta3.AppEngi" + + "neHttpRequest.HeadersEntry\022\014\n\004body\030\005 \001(\014" + + "\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"T\n\020AppEngineRouting\022\017\n\007service\030" + + "\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\020\n\010instance\030\003 \001(\t" + + "\022\014\n\004host\030\004 \001(\t\":\n\nOAuthToken\022\035\n\025service_" + + "account_email\030\001 \001(\t\022\r\n\005scope\030\002 \001(\t\"<\n\tOi" + + "dcToken\022\035\n\025service_account_email\030\001 \001(\t\022\020" + + "\n\010audience\030\002 \001(\t*s\n\nHttpMethod\022\033\n\027HTTP_M" + + "ETHOD_UNSPECIFIED\020\000\022\010\n\004POST\020\001\022\007\n\003GET\020\002\022\010" + + "\n\004HEAD\020\003\022\007\n\003PUT\020\004\022\n\n\006DELETE\020\005\022\t\n\005PATCH\020\006" + + "\022\013\n\007OPTIONS\020\007Bt\n\036com.google.cloud.tasks." + + "v2beta3B\013TargetProtoP\001ZCcloud.google.com" + + "/go/cloudtasks/apiv2beta3/cloudtaskspb;c" + + "loudtaskspbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -119,8 +170,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Payload", "Tag", }); - internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor = + internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tasks_v2beta3_PathOverride_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_PathOverride_descriptor, + new java.lang.String[] { + "Path", + }); + internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tasks_v2beta3_QueryOverride_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_QueryOverride_descriptor, + new java.lang.String[] { + "QueryParams", + }); + internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_tasks_v2beta3_UriOverride_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor, + new java.lang.String[] { + "Scheme", + "Host", + "Port", + "PathOverride", + "QueryOverride", + "UriOverrideEnforceMode", + "Scheme", + "Host", + "Port", + }); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor, + new java.lang.String[] { + "UriOverride", + "HttpMethod", + "HeaderOverrides", + "OauthToken", + "OidcToken", + "AuthorizationHeader", + }); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor = + internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_HttpTarget_Header_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor = + internal_static_google_cloud_tasks_v2beta3_HttpTarget_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_HttpTarget_HeaderOverride_descriptor, + new java.lang.String[] { + "Header", + }); + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor, @@ -142,7 +254,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor, @@ -150,7 +262,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AppEngineRoutingOverride", }); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor, @@ -168,7 +280,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor, @@ -176,7 +288,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Service", "Version", "Instance", "Host", }); internal_static_google_cloud_tasks_v2beta3_OAuthToken_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_tasks_v2beta3_OAuthToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_OAuthToken_descriptor, @@ -184,7 +296,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceAccountEmail", "Scope", }); internal_static_google_cloud_tasks_v2beta3_OidcToken_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_tasks_v2beta3_OidcToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_OidcToken_descriptor, diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequest.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequest.java index 1fa6e18c6df8..169ad5d17911 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequest.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequest.java @@ -22,7 +22,8 @@ * * *
- * Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue].
+ * Request message for
+ * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue].
  * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.UpdateQueueRequest} @@ -68,11 +69,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -90,11 +93,13 @@ public boolean hasQueue() { *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -112,11 +117,13 @@ public com.google.cloud.tasks.v2beta3.Queue getQueue() { *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -361,7 +368,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue].
+   * Request message for
+   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue].
    * 
* * Protobuf type {@code google.cloud.tasks.v2beta3.UpdateQueueRequest} @@ -571,11 +579,13 @@ public Builder mergeFrom( *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -592,11 +602,13 @@ public boolean hasQueue() { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -617,11 +629,13 @@ public com.google.cloud.tasks.v2beta3.Queue getQueue() { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -646,11 +660,13 @@ public Builder setQueue(com.google.cloud.tasks.v2beta3.Queue value) { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -672,11 +688,13 @@ public Builder setQueue(com.google.cloud.tasks.v2beta3.Queue.Builder builderForV *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -704,11 +722,13 @@ public Builder mergeQueue(com.google.cloud.tasks.v2beta3.Queue value) { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -730,11 +750,13 @@ public Builder clearQueue() { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -751,11 +773,13 @@ public com.google.cloud.tasks.v2beta3.Queue.Builder getQueueBuilder() { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -774,11 +798,13 @@ public com.google.cloud.tasks.v2beta3.QueueOrBuilder getQueueOrBuilder() { *
      * Required. The queue to create or update.
      *
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+     * specified.
      *
      * Output only fields cannot be modified using UpdateQueue.
      * Any value specified for an output only field will be ignored.
-     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+     * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+     * changed.
      * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequestOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequestOrBuilder.java index 1f1527ebb5a8..099e846ff1f1 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequestOrBuilder.java +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UpdateQueueRequestOrBuilder.java @@ -29,11 +29,13 @@ public interface UpdateQueueRequestOrBuilder *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -48,11 +50,13 @@ public interface UpdateQueueRequestOrBuilder *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -67,11 +71,13 @@ public interface UpdateQueueRequestOrBuilder *
    * Required. The queue to create or update.
    *
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be
+   * specified.
    *
    * Output only fields cannot be modified using UpdateQueue.
    * Any value specified for an output only field will be ignored.
-   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed.
+   * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be
+   * changed.
    * 
* * .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverride.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverride.java new file mode 100644 index 000000000000..14411d5feeaa --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverride.java @@ -0,0 +1,2213 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * URI Override.
+ *
+ * When specified, all the HTTP tasks inside the queue will be partially or
+ * fully overridden depending on the configured values.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.UriOverride} + */ +public final class UriOverride extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.UriOverride) + UriOverrideOrBuilder { + private static final long serialVersionUID = 0L; + // Use UriOverride.newBuilder() to construct. + private UriOverride(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UriOverride() { + scheme_ = 0; + host_ = ""; + uriOverrideEnforceMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UriOverride(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_UriOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.UriOverride.class, + com.google.cloud.tasks.v2beta3.UriOverride.Builder.class); + } + + /** + * + * + *
+   * The Scheme for an HTTP request. By default, it is HTTPS.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta3.UriOverride.Scheme} + */ + public enum Scheme implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Scheme unspecified. Defaults to HTTPS.
+     * 
+ * + * SCHEME_UNSPECIFIED = 0; + */ + SCHEME_UNSPECIFIED(0), + /** + * + * + *
+     * Convert the scheme to HTTP, e.g., https://www.google.ca will change to
+     * http://www.google.ca.
+     * 
+ * + * HTTP = 1; + */ + HTTP(1), + /** + * + * + *
+     * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to
+     * https://www.google.ca.
+     * 
+ * + * HTTPS = 2; + */ + HTTPS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Scheme unspecified. Defaults to HTTPS.
+     * 
+ * + * SCHEME_UNSPECIFIED = 0; + */ + public static final int SCHEME_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Convert the scheme to HTTP, e.g., https://www.google.ca will change to
+     * http://www.google.ca.
+     * 
+ * + * HTTP = 1; + */ + public static final int HTTP_VALUE = 1; + /** + * + * + *
+     * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to
+     * https://www.google.ca.
+     * 
+ * + * HTTPS = 2; + */ + public static final int HTTPS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Scheme valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Scheme forNumber(int value) { + switch (value) { + case 0: + return SCHEME_UNSPECIFIED; + case 1: + return HTTP; + case 2: + return HTTPS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Scheme findValueByNumber(int number) { + return Scheme.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.UriOverride.getDescriptor().getEnumTypes().get(0); + } + + private static final Scheme[] VALUES = values(); + + public static Scheme valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Scheme(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta3.UriOverride.Scheme) + } + + /** + * + * + *
+   * UriOverrideEnforceMode mode is to define enforcing mode for the override
+   * modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode} + */ + public enum UriOverrideEnforceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * OverrideMode Unspecified. Defaults to ALWAYS.
+     * 
+ * + * URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * In the IF_NOT_EXISTS mode, queue-level configuration is only
+     * applied where task-level configuration does not exist.
+     * 
+ * + * IF_NOT_EXISTS = 1; + */ + IF_NOT_EXISTS(1), + /** + * + * + *
+     * In the ALWAYS mode, queue-level configuration overrides all
+     * task-level configuration
+     * 
+ * + * ALWAYS = 2; + */ + ALWAYS(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * OverrideMode Unspecified. Defaults to ALWAYS.
+     * 
+ * + * URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + public static final int URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * In the IF_NOT_EXISTS mode, queue-level configuration is only
+     * applied where task-level configuration does not exist.
+     * 
+ * + * IF_NOT_EXISTS = 1; + */ + public static final int IF_NOT_EXISTS_VALUE = 1; + /** + * + * + *
+     * In the ALWAYS mode, queue-level configuration overrides all
+     * task-level configuration
+     * 
+ * + * ALWAYS = 2; + */ + public static final int ALWAYS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static UriOverrideEnforceMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static UriOverrideEnforceMode forNumber(int value) { + switch (value) { + case 0: + return URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED; + case 1: + return IF_NOT_EXISTS; + case 2: + return ALWAYS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UriOverrideEnforceMode findValueByNumber(int number) { + return UriOverrideEnforceMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.UriOverride.getDescriptor().getEnumTypes().get(1); + } + + private static final UriOverrideEnforceMode[] VALUES = values(); + + public static UriOverrideEnforceMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UriOverrideEnforceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode) + } + + private int bitField0_; + public static final int SCHEME_FIELD_NUMBER = 1; + private int scheme_ = 0; + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + @java.lang.Override + public boolean hasScheme() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + @java.lang.Override + public int getSchemeValue() { + return scheme_; + } + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride.Scheme getScheme() { + com.google.cloud.tasks.v2beta3.UriOverride.Scheme result = + com.google.cloud.tasks.v2beta3.UriOverride.Scheme.forNumber(scheme_); + return result == null ? com.google.cloud.tasks.v2beta3.UriOverride.Scheme.UNRECOGNIZED : result; + } + + public static final int HOST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object host_ = ""; + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + @java.lang.Override + public boolean hasHost() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The host. + */ + @java.lang.Override + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + private long port_ = 0L; + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + @java.lang.Override + public boolean hasPort() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + @java.lang.Override + public long getPort() { + return port_; + } + + public static final int PATH_OVERRIDE_FIELD_NUMBER = 4; + private com.google.cloud.tasks.v2beta3.PathOverride pathOverride_; + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + @java.lang.Override + public boolean hasPathOverride() { + return pathOverride_ != null; + } + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverride getPathOverride() { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance() + : pathOverride_; + } + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder getPathOverrideOrBuilder() { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance() + : pathOverride_; + } + + public static final int QUERY_OVERRIDE_FIELD_NUMBER = 5; + private com.google.cloud.tasks.v2beta3.QueryOverride queryOverride_; + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + @java.lang.Override + public boolean hasQueryOverride() { + return queryOverride_ != null; + } + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverride getQueryOverride() { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance() + : queryOverride_; + } + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder getQueryOverrideOrBuilder() { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance() + : queryOverride_; + } + + public static final int URI_OVERRIDE_ENFORCE_MODE_FIELD_NUMBER = 6; + private int uriOverrideEnforceMode_ = 0; + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + @java.lang.Override + public int getUriOverrideEnforceModeValue() { + return uriOverrideEnforceMode_; + } + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode + getUriOverrideEnforceMode() { + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode result = + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode.forNumber( + uriOverrideEnforceMode_); + return result == null + ? com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, scheme_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, port_); + } + if (pathOverride_ != null) { + output.writeMessage(4, getPathOverride()); + } + if (queryOverride_ != null) { + output.writeMessage(5, getQueryOverride()); + } + if (uriOverrideEnforceMode_ + != com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode + .URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, uriOverrideEnforceMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, scheme_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, port_); + } + if (pathOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPathOverride()); + } + if (queryOverride_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getQueryOverride()); + } + if (uriOverrideEnforceMode_ + != com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode + .URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, uriOverrideEnforceMode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.UriOverride)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.UriOverride other = + (com.google.cloud.tasks.v2beta3.UriOverride) obj; + + if (hasScheme() != other.hasScheme()) return false; + if (hasScheme()) { + if (scheme_ != other.scheme_) return false; + } + if (hasHost() != other.hasHost()) return false; + if (hasHost()) { + if (!getHost().equals(other.getHost())) return false; + } + if (hasPort() != other.hasPort()) return false; + if (hasPort()) { + if (getPort() != other.getPort()) return false; + } + if (hasPathOverride() != other.hasPathOverride()) return false; + if (hasPathOverride()) { + if (!getPathOverride().equals(other.getPathOverride())) return false; + } + if (hasQueryOverride() != other.hasQueryOverride()) return false; + if (hasQueryOverride()) { + if (!getQueryOverride().equals(other.getQueryOverride())) return false; + } + if (uriOverrideEnforceMode_ != other.uriOverrideEnforceMode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasScheme()) { + hash = (37 * hash) + SCHEME_FIELD_NUMBER; + hash = (53 * hash) + scheme_; + } + if (hasHost()) { + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + } + if (hasPort()) { + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPort()); + } + if (hasPathOverride()) { + hash = (37 * hash) + PATH_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getPathOverride().hashCode(); + } + if (hasQueryOverride()) { + hash = (37 * hash) + QUERY_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getQueryOverride().hashCode(); + } + hash = (37 * hash) + URI_OVERRIDE_ENFORCE_MODE_FIELD_NUMBER; + hash = (53 * hash) + uriOverrideEnforceMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.UriOverride prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * URI Override.
+   *
+   * When specified, all the HTTP tasks inside the queue will be partially or
+   * fully overridden depending on the configured values.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.UriOverride} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.UriOverride) + com.google.cloud.tasks.v2beta3.UriOverrideOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_UriOverride_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.UriOverride.class, + com.google.cloud.tasks.v2beta3.UriOverride.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.UriOverride.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scheme_ = 0; + host_ = ""; + port_ = 0L; + pathOverride_ = null; + if (pathOverrideBuilder_ != null) { + pathOverrideBuilder_.dispose(); + pathOverrideBuilder_ = null; + } + queryOverride_ = null; + if (queryOverrideBuilder_ != null) { + queryOverrideBuilder_.dispose(); + queryOverrideBuilder_ = null; + } + uriOverrideEnforceMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_UriOverride_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride build() { + com.google.cloud.tasks.v2beta3.UriOverride result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride buildPartial() { + com.google.cloud.tasks.v2beta3.UriOverride result = + new com.google.cloud.tasks.v2beta3.UriOverride(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.tasks.v2beta3.UriOverride result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.scheme_ = scheme_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.host_ = host_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.port_ = port_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pathOverride_ = + pathOverrideBuilder_ == null ? pathOverride_ : pathOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.queryOverride_ = + queryOverrideBuilder_ == null ? queryOverride_ : queryOverrideBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uriOverrideEnforceMode_ = uriOverrideEnforceMode_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.UriOverride) { + return mergeFrom((com.google.cloud.tasks.v2beta3.UriOverride) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.UriOverride other) { + if (other == com.google.cloud.tasks.v2beta3.UriOverride.getDefaultInstance()) return this; + if (other.hasScheme()) { + setScheme(other.getScheme()); + } + if (other.hasHost()) { + host_ = other.host_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPort()) { + setPort(other.getPort()); + } + if (other.hasPathOverride()) { + mergePathOverride(other.getPathOverride()); + } + if (other.hasQueryOverride()) { + mergeQueryOverride(other.getQueryOverride()); + } + if (other.uriOverrideEnforceMode_ != 0) { + setUriOverrideEnforceModeValue(other.getUriOverrideEnforceModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + scheme_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + port_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(getPathOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getQueryOverrideFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + uriOverrideEnforceMode_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int scheme_ = 0; + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + @java.lang.Override + public boolean hasScheme() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + @java.lang.Override + public int getSchemeValue() { + return scheme_; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @param value The enum numeric value on the wire for scheme to set. + * @return This builder for chaining. + */ + public Builder setSchemeValue(int value) { + scheme_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride.Scheme getScheme() { + com.google.cloud.tasks.v2beta3.UriOverride.Scheme result = + com.google.cloud.tasks.v2beta3.UriOverride.Scheme.forNumber(scheme_); + return result == null + ? com.google.cloud.tasks.v2beta3.UriOverride.Scheme.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @param value The scheme to set. + * @return This builder for chaining. + */ + public Builder setScheme(com.google.cloud.tasks.v2beta3.UriOverride.Scheme value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + scheme_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Scheme override.
+     *
+     * When specified, the task URI scheme is replaced by the provided value (HTTP
+     * or HTTPS).
+     * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return This builder for chaining. + */ + public Builder clearScheme() { + bitField0_ = (bitField0_ & ~0x00000001); + scheme_ = 0; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + public boolean hasHost() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + public com.google.protobuf.ByteString getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + host_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @return This builder for chaining. + */ + public Builder clearHost() { + host_ = getDefaultInstance().getHost(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Host override.
+     *
+     * When specified, replaces the host part of the task URL. For example,
+     * if the task URL is "https://www.google.com," and host value is set to
+     * "example.net", the overridden URI will be changed to "https://example.net."
+     * Host value cannot be an empty string (INVALID_ARGUMENT).
+     * 
+ * + * optional string host = 2; + * + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + host_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long port_; + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + @java.lang.Override + public boolean hasPort() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + @java.lang.Override + public long getPort() { + return port_; + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(long value) { + + port_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Port override.
+     *
+     * When specified, replaces the port part of the task URI. For instance,
+     * for a URI http://www.google.com/foo and port=123, the overridden URI
+     * becomes http://www.google.com:123/foo. Note that the port value must be a
+     * positive integer. Setting the port to 0 (Zero) clears the URI port.
+     * 
+ * + * optional int64 port = 3; + * + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000004); + port_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta3.PathOverride pathOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PathOverride, + com.google.cloud.tasks.v2beta3.PathOverride.Builder, + com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder> + pathOverrideBuilder_; + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + public boolean hasPathOverride() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + public com.google.cloud.tasks.v2beta3.PathOverride getPathOverride() { + if (pathOverrideBuilder_ == null) { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance() + : pathOverride_; + } else { + return pathOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public Builder setPathOverride(com.google.cloud.tasks.v2beta3.PathOverride value) { + if (pathOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pathOverride_ = value; + } else { + pathOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public Builder setPathOverride( + com.google.cloud.tasks.v2beta3.PathOverride.Builder builderForValue) { + if (pathOverrideBuilder_ == null) { + pathOverride_ = builderForValue.build(); + } else { + pathOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public Builder mergePathOverride(com.google.cloud.tasks.v2beta3.PathOverride value) { + if (pathOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && pathOverride_ != null + && pathOverride_ != com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance()) { + getPathOverrideBuilder().mergeFrom(value); + } else { + pathOverride_ = value; + } + } else { + pathOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public Builder clearPathOverride() { + bitField0_ = (bitField0_ & ~0x00000008); + pathOverride_ = null; + if (pathOverrideBuilder_ != null) { + pathOverrideBuilder_.dispose(); + pathOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public com.google.cloud.tasks.v2beta3.PathOverride.Builder getPathOverrideBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPathOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + public com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder getPathOverrideOrBuilder() { + if (pathOverrideBuilder_ != null) { + return pathOverrideBuilder_.getMessageOrBuilder(); + } else { + return pathOverride_ == null + ? com.google.cloud.tasks.v2beta3.PathOverride.getDefaultInstance() + : pathOverride_; + } + } + /** + * + * + *
+     * URI path.
+     *
+     * When specified, replaces the existing path of the task URL. Setting the
+     * path value to an empty string clears the URI path segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PathOverride, + com.google.cloud.tasks.v2beta3.PathOverride.Builder, + com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder> + getPathOverrideFieldBuilder() { + if (pathOverrideBuilder_ == null) { + pathOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PathOverride, + com.google.cloud.tasks.v2beta3.PathOverride.Builder, + com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder>( + getPathOverride(), getParentForChildren(), isClean()); + pathOverride_ = null; + } + return pathOverrideBuilder_; + } + + private com.google.cloud.tasks.v2beta3.QueryOverride queryOverride_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueryOverride, + com.google.cloud.tasks.v2beta3.QueryOverride.Builder, + com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder> + queryOverrideBuilder_; + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + public boolean hasQueryOverride() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + public com.google.cloud.tasks.v2beta3.QueryOverride getQueryOverride() { + if (queryOverrideBuilder_ == null) { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance() + : queryOverride_; + } else { + return queryOverrideBuilder_.getMessage(); + } + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public Builder setQueryOverride(com.google.cloud.tasks.v2beta3.QueryOverride value) { + if (queryOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryOverride_ = value; + } else { + queryOverrideBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public Builder setQueryOverride( + com.google.cloud.tasks.v2beta3.QueryOverride.Builder builderForValue) { + if (queryOverrideBuilder_ == null) { + queryOverride_ = builderForValue.build(); + } else { + queryOverrideBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public Builder mergeQueryOverride(com.google.cloud.tasks.v2beta3.QueryOverride value) { + if (queryOverrideBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && queryOverride_ != null + && queryOverride_ + != com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance()) { + getQueryOverrideBuilder().mergeFrom(value); + } else { + queryOverride_ = value; + } + } else { + queryOverrideBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public Builder clearQueryOverride() { + bitField0_ = (bitField0_ & ~0x00000010); + queryOverride_ = null; + if (queryOverrideBuilder_ != null) { + queryOverrideBuilder_.dispose(); + queryOverrideBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public com.google.cloud.tasks.v2beta3.QueryOverride.Builder getQueryOverrideBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getQueryOverrideFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + public com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder getQueryOverrideOrBuilder() { + if (queryOverrideBuilder_ != null) { + return queryOverrideBuilder_.getMessageOrBuilder(); + } else { + return queryOverride_ == null + ? com.google.cloud.tasks.v2beta3.QueryOverride.getDefaultInstance() + : queryOverride_; + } + } + /** + * + * + *
+     * URI Query.
+     *
+     * When specified, replaces the query part of the task URI. Setting the
+     * query value to an empty string clears the URI query segment.
+     * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueryOverride, + com.google.cloud.tasks.v2beta3.QueryOverride.Builder, + com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder> + getQueryOverrideFieldBuilder() { + if (queryOverrideBuilder_ == null) { + queryOverrideBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueryOverride, + com.google.cloud.tasks.v2beta3.QueryOverride.Builder, + com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder>( + getQueryOverride(), getParentForChildren(), isClean()); + queryOverride_ = null; + } + return queryOverrideBuilder_; + } + + private int uriOverrideEnforceMode_ = 0; + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + @java.lang.Override + public int getUriOverrideEnforceModeValue() { + return uriOverrideEnforceMode_; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @param value The enum numeric value on the wire for uriOverrideEnforceMode to set. + * @return This builder for chaining. + */ + public Builder setUriOverrideEnforceModeValue(int value) { + uriOverrideEnforceMode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode + getUriOverrideEnforceMode() { + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode result = + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode.forNumber( + uriOverrideEnforceMode_); + return result == null + ? com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @param value The uriOverrideEnforceMode to set. + * @return This builder for chaining. + */ + public Builder setUriOverrideEnforceMode( + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + uriOverrideEnforceMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * URI Override Enforce Mode
+     *
+     * When specified, determines the Target UriOverride mode. If not specified,
+     * it defaults to ALWAYS.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearUriOverrideEnforceMode() { + bitField0_ = (bitField0_ & ~0x00000020); + uriOverrideEnforceMode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.UriOverride) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.UriOverride) + private static final com.google.cloud.tasks.v2beta3.UriOverride DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.UriOverride(); + } + + public static com.google.cloud.tasks.v2beta3.UriOverride getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UriOverride parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.UriOverride getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverrideOrBuilder.java b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverrideOrBuilder.java new file mode 100644 index 000000000000..d5f288130afb --- /dev/null +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/UriOverrideOrBuilder.java @@ -0,0 +1,281 @@ +/* + * Copyright 2023 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface UriOverrideOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.UriOverride) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return Whether the scheme field is set. + */ + boolean hasScheme(); + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The enum numeric value on the wire for scheme. + */ + int getSchemeValue(); + /** + * + * + *
+   * Scheme override.
+   *
+   * When specified, the task URI scheme is replaced by the provided value (HTTP
+   * or HTTPS).
+   * 
+ * + * optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * + * @return The scheme. + */ + com.google.cloud.tasks.v2beta3.UriOverride.Scheme getScheme(); + + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return Whether the host field is set. + */ + boolean hasHost(); + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The host. + */ + java.lang.String getHost(); + /** + * + * + *
+   * Host override.
+   *
+   * When specified, replaces the host part of the task URL. For example,
+   * if the task URL is "https://www.google.com," and host value is set to
+   * "example.net", the overridden URI will be changed to "https://example.net."
+   * Host value cannot be an empty string (INVALID_ARGUMENT).
+   * 
+ * + * optional string host = 2; + * + * @return The bytes for host. + */ + com.google.protobuf.ByteString getHostBytes(); + + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return Whether the port field is set. + */ + boolean hasPort(); + /** + * + * + *
+   * Port override.
+   *
+   * When specified, replaces the port part of the task URI. For instance,
+   * for a URI http://www.google.com/foo and port=123, the overridden URI
+   * becomes http://www.google.com:123/foo. Note that the port value must be a
+   * positive integer. Setting the port to 0 (Zero) clears the URI port.
+   * 
+ * + * optional int64 port = 3; + * + * @return The port. + */ + long getPort(); + + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return Whether the pathOverride field is set. + */ + boolean hasPathOverride(); + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * + * @return The pathOverride. + */ + com.google.cloud.tasks.v2beta3.PathOverride getPathOverride(); + /** + * + * + *
+   * URI path.
+   *
+   * When specified, replaces the existing path of the task URL. Setting the
+   * path value to an empty string clears the URI path segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + com.google.cloud.tasks.v2beta3.PathOverrideOrBuilder getPathOverrideOrBuilder(); + + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return Whether the queryOverride field is set. + */ + boolean hasQueryOverride(); + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * + * @return The queryOverride. + */ + com.google.cloud.tasks.v2beta3.QueryOverride getQueryOverride(); + /** + * + * + *
+   * URI Query.
+   *
+   * When specified, replaces the query part of the task URI. Setting the
+   * query value to an empty string clears the URI query segment.
+   * 
+ * + * .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + com.google.cloud.tasks.v2beta3.QueryOverrideOrBuilder getQueryOverrideOrBuilder(); + + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The enum numeric value on the wire for uriOverrideEnforceMode. + */ + int getUriOverrideEnforceModeValue(); + /** + * + * + *
+   * URI Override Enforce Mode
+   *
+   * When specified, determines the Target UriOverride mode. If not specified,
+   * it defaults to ALWAYS.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * + * + * @return The uriOverrideEnforceMode. + */ + com.google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode getUriOverrideEnforceMode(); +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto index 78605971bbb7..80671c12f88c 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ package google.cloud.tasks.v2beta3; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta3/queue.proto"; import "google/cloud/tasks/v2beta3/task.proto"; @@ -37,7 +38,8 @@ option objc_class_prefix = "TASKS"; // work in their applications. service CloudTasks { option (google.api.default_host) = "cloudtasks.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 queues. // @@ -60,8 +62,8 @@ service CloudTasks { // Creates a queue. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -83,8 +85,8 @@ service CloudTasks { // the queue if it does exist. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -138,9 +140,10 @@ service CloudTasks { // // If a queue is paused then the system will stop dispatching tasks // until the queue is resumed via - // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added - // when the queue is paused. A queue is paused if its - // [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can + // still be added when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta3.Queue.state] is + // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. rpc PauseQueue(PauseQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2beta3/{name=projects/*/locations/*/queues/*}:pause" @@ -153,9 +156,11 @@ service CloudTasks { // // This method resumes a queue after it has been // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored - // in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it - // will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + // queue is stored in the queue's + // [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + // it will be set to + // [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. // // WARNING: Resuming many high-QPS queues at the same time can // lead to target overloading. If you are resuming high-QPS @@ -170,16 +175,17 @@ service CloudTasks { option (google.api.method_signature) = "name"; } - // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. - // Returns an empty policy if the resource exists and does not have a policy - // set. + // Gets the access control policy for a + // [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the + // resource exists and does not have a policy set. // // Authorization requires the following // [Google IAM](https://cloud.google.com/iam) permission on the specified // resource parent: // // * `cloudtasks.queues.getIamPolicy` - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" @@ -187,8 +193,8 @@ service CloudTasks { option (google.api.method_signature) = "resource"; } - // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing - // policy. + // Sets the access control policy for a + // [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy. // // Note: The Cloud Console does not check queue-level IAM permissions yet. // Project-level permissions are required to use the Cloud Console. @@ -198,7 +204,8 @@ service CloudTasks { // resource parent: // // * `cloudtasks.queues.setIamPolicy` - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" @@ -206,14 +213,16 @@ service CloudTasks { option (google.api.method_signature) = "resource,policy"; } - // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue]. - // If the resource does not exist, this will return an empty set of - // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // Returns permissions that a caller has on a + // [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist, + // this will return an empty set of permissions, not a + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. // // Note: This operation is designed to be used for building permission-aware // UIs and command-line tools, not for authorization checking. This operation // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" @@ -223,10 +232,10 @@ service CloudTasks { // Lists the tasks in a queue. // - // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved - // due to performance considerations; - // [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the - // subset of information which is returned. + // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] + // view is retrieved due to performance considerations; + // [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] + // controls the subset of information which is returned. // // The tasks may be returned in any order. The ordering may change at any // time. @@ -273,13 +282,14 @@ service CloudTasks { // Forces a task to run now. // // When this method is called, Cloud Tasks will dispatch the task, even if - // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or - // is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + // the task is already running, the queue has reached its + // [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is + // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. // // This command is meant to be used for manual debugging. For - // example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed - // task after a fix has been made or to manually force a task to be - // dispatched now. + // example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be + // used to retry a failed task after a fix has been made or to manually force + // a task to be dispatched now. // // The dispatched task is returned. That is, the task that is returned // contains the [status][Task.status] after the task is dispatched but @@ -287,9 +297,11 @@ service CloudTasks { // // If Cloud Tasks receives a successful response from the task's // target, then the task will be deleted; otherwise the task's - // [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that - // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified - // in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be + // reset to the time that + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus + // the retry delay specified in the queue's + // [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. // // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a @@ -301,9 +313,29 @@ service CloudTasks { }; option (google.api.method_signature) = "name"; } + + // Creates and buffers a new task without the need to explicitly define a Task + // message. The queue must have [HTTP + // target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a + // custom ID, use the following format and set TASK_ID to your desired ID: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer + // To create the task with an automatically generated ID, use the following + // format: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. + // Note: This feature is in its experimental stage. You must request access to + // the API through the [Cloud Tasks BufferTask Experiment Signup + // form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + rpc BufferTask(BufferTaskRequest) returns (BufferTaskResponse) { + option (google.api.http) = { + post: "/v2beta3/{queue=projects/*/locations/*/queues/*}/tasks/{task_id}:buffer" + body: "*" + }; + option (google.api.method_signature) = "queue,task_id,body"; + } } -// Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +// Request message for +// [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. message ListQueuesRequest { // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -314,11 +346,10 @@ message ListQueuesRequest { } ]; - // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue] - // field can be used as a filter and several operators as supported. - // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - // described in - // [Stackdriver's Advanced Logs + // `filter` can be used to specify a subset of queues. Any + // [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + // several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + // filter syntax is the same as described in [Stackdriver's Advanced Logs // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). // // Sample filter "state: PAUSED". @@ -332,28 +363,32 @@ message ListQueuesRequest { // The maximum page size is 9800. If unspecified, the page size will // be the maximum. Fewer queues than requested might be returned, // even if more queues exist; use the - // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the - // response to determine if more queues exist. + // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + // in the response to determine if more queues exist. int32 page_size = 3; // A token identifying the page of results to 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.tasks.v2beta3.ListQueuesResponse.next_page_token] returned - // from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] - // method. It is an error to switch the value of the - // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + // returned from the previous call to + // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + // is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + // iterating through pages. string page_token = 4; - // Optional. Read mask is used for a more granular control over what the API returns. - // If the mask is not present all fields will be returned except + // Optional. Read mask is used for a more granular control over what the API + // returns. If the mask is not present all fields will be returned except // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly // specified in the mask. - google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +// Response message for +// [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. message ListQueuesResponse { // The list of queues. repeated Queue queues = 1; @@ -361,7 +396,8 @@ message ListQueuesResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + // value as the // [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. // // If the next_page_token is empty, there are no more results. @@ -370,7 +406,8 @@ message ListQueuesResponse { string next_page_token = 2; } -// Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. +// Request message for +// [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. message GetQueueRequest { // Required. The resource name of the queue. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -381,14 +418,16 @@ message GetQueueRequest { } ]; - // Optional. Read mask is used for a more granular control over what the API returns. - // If the mask is not present all fields will be returned except + // Optional. Read mask is used for a more granular control over what the API + // returns. If the mask is not present all fields will be returned except // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly // specified in the mask. - google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask read_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. +// Request message for +// [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. message CreateQueueRequest { // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -405,19 +444,23 @@ message CreateQueueRequest { // Required. The queue to create. // - // [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. + // [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + // an existing queue. Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. +// Request message for +// [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. message UpdateQueueRequest { // Required. The queue to create or update. // - // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified. + // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + // specified. // // Output only fields cannot be modified using UpdateQueue. // Any value specified for an output only field will be ignored. - // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed. + // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + // changed. Queue queue = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the queue are being updated. @@ -426,7 +469,8 @@ message UpdateQueueRequest { google.protobuf.FieldMask update_mask = 2; } -// Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. +// Request message for +// [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. message DeleteQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -438,7 +482,8 @@ message DeleteQueueRequest { ]; } -// Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. +// Request message for +// [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. message PurgeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -450,7 +495,8 @@ message PurgeQueueRequest { ]; } -// Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. +// Request message for +// [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. message PauseQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -462,7 +508,8 @@ message PauseQueueRequest { ]; } -// Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. +// Request message for +// [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. message ResumeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -474,7 +521,8 @@ message ResumeQueueRequest { ]; } -// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +// Request message for listing tasks using +// [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. message ListTasksRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -485,25 +533,26 @@ message ListTasksRequest { } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta3.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta3.Task] resource. Task.View response_view = 2; // Maximum page size. // // Fewer tasks than requested might be returned, even if more tasks exist; use - // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to - // determine if more tasks exist. + // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + // in the response to determine if more tasks exist. // // The maximum page size is 1000. If unspecified, the page size will be the // maximum. @@ -513,15 +562,16 @@ message ListTasksRequest { // // 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.tasks.v2beta3.ListTasksResponse.next_page_token] returned - // from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] - // method. + // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + // returned from the previous call to + // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. // // The page token is valid for only 2 hours. string page_token = 4; } -// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +// Response message for listing tasks using +// [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. message ListTasksResponse { // The list of tasks. repeated Task tasks = 1; @@ -529,40 +579,42 @@ message ListTasksResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + // value as the // [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. // // If the next_page_token is empty, there are no more results. string next_page_token = 2; } -// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. +// Request message for getting a task using +// [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. message GetTaskRequest { // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta3.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta3.Task] resource. Task.View response_view = 2; } -// Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. +// Request message for +// [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. message CreateTaskRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -579,13 +631,13 @@ message CreateTaskRequest { // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - // The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a - // name is not specified then the system will generate a random - // unique task id, which will be set in the task returned in the - // [response][google.cloud.tasks.v2beta3.Task.name]. + // The user can optionally specify a task + // [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + // then the system will generate a random unique task id, which will be set in + // the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. // - // If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the - // past then Cloud Tasks will set it to the current time. + // If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + // set or is in the past then Cloud Tasks will set it to the current time. // // Task De-duplication: // @@ -594,34 +646,35 @@ message CreateTaskRequest { // that was deleted or executed recently then the call will fail // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. // If the task's queue was created using Cloud Tasks, then another task with - // the same name can't be created for ~1hour after the original task was + // the same name can't be created for ~1 hour after the original task was // deleted or executed. If the task's queue was created using queue.yaml or // queue.xml, then another task with the same name can't be created - // for ~9days after the original task was deleted or executed. + // for ~9 days after the original task was deleted or executed. // // Because there is an extra lookup cost to identify duplicate task - // names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly - // increased latency. Using hashed strings for the task id or for - // the prefix of the task id is recommended. Choosing task ids that - // are sequential or have sequential prefixes, for example using a + // names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + // calls have significantly increased latency. Using hashed strings for the + // task id or for the prefix of the task id is recommended. Choosing task ids + // that are sequential or have sequential prefixes, for example using a // timestamp, causes an increase in latency and error rates in all // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. Task task = 2 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta3.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta3.Task] resource. Task.View response_view = 3; } @@ -632,9 +685,7 @@ message DeleteTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; } @@ -645,22 +696,53 @@ message RunTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta3.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta3.Task] resource. Task.View response_view = 2; } + +// Request message for +// [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. +message BufferTaskRequest { + // Required. The parent queue name. For example: + // projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + string queue = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudtasks.googleapis.com/Task" + } + ]; + + // Optional. Task ID for the task being created. If not provided, a random + // task ID is assigned to the task. + string task_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Body of the HTTP request. + // + // The body can take any generic value. The value is written to the + // [HttpRequest][payload] of the [Task]. + google.api.HttpBody body = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. +message BufferTaskResponse { + // The created task. + Task task = 1; +} diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto index 573d2ca2fe4f..f56a080b44dc 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -116,6 +116,9 @@ message Queue { AppEngineHttpQueue app_engine_http_queue = 3; } + // Modifies HTTP target for HTTP tasks. + HttpTarget http_target = 13; + // Rate limits for task dispatches. // // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and @@ -160,7 +163,7 @@ message Queue { // Output only. The state of the queue. // - // `state` can only be changed by calling + // `state` can only be changed by called // [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or // uploading diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto index 18fd119d697f..fd6dcad07796 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -46,6 +46,191 @@ message PullMessage { string tag = 2; } +// PathOverride. +// +// Path message defines path override for HTTP targets. +message PathOverride { + // The URI path (e.g., /users/1234). Default is an empty string. + string path = 1; +} + +// QueryOverride. +// +// Query message defines query override for HTTP targets. +message QueryOverride { + // The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + // string. + string query_params = 1; +} + +// URI Override. +// +// When specified, all the HTTP tasks inside the queue will be partially or +// fully overridden depending on the configured values. +message UriOverride { + // The Scheme for an HTTP request. By default, it is HTTPS. + enum Scheme { + // Scheme unspecified. Defaults to HTTPS. + SCHEME_UNSPECIFIED = 0; + + // Convert the scheme to HTTP, e.g., https://www.google.ca will change to + // http://www.google.ca. + HTTP = 1; + + // Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + // https://www.google.ca. + HTTPS = 2; + } + + // UriOverrideEnforceMode mode is to define enforcing mode for the override + // modes. + enum UriOverrideEnforceMode { + // OverrideMode Unspecified. Defaults to ALWAYS. + URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + + // In the IF_NOT_EXISTS mode, queue-level configuration is only + // applied where task-level configuration does not exist. + IF_NOT_EXISTS = 1; + + // In the ALWAYS mode, queue-level configuration overrides all + // task-level configuration + ALWAYS = 2; + } + + // Scheme override. + // + // When specified, the task URI scheme is replaced by the provided value (HTTP + // or HTTPS). + optional Scheme scheme = 1; + + // Host override. + // + // When specified, replaces the host part of the task URL. For example, + // if the task URL is "https://www.google.com," and host value is set to + // "example.net", the overridden URI will be changed to "https://example.net." + // Host value cannot be an empty string (INVALID_ARGUMENT). + optional string host = 2; + + // Port override. + // + // When specified, replaces the port part of the task URI. For instance, + // for a URI http://www.google.com/foo and port=123, the overridden URI + // becomes http://www.google.com:123/foo. Note that the port value must be a + // positive integer. Setting the port to 0 (Zero) clears the URI port. + optional int64 port = 3; + + // URI path. + // + // When specified, replaces the existing path of the task URL. Setting the + // path value to an empty string clears the URI path segment. + PathOverride path_override = 4; + + // URI Query. + // + // When specified, replaces the query part of the task URI. Setting the + // query value to an empty string clears the URI query segment. + QueryOverride query_override = 5; + + // URI Override Enforce Mode + // + // When specified, determines the Target UriOverride mode. If not specified, + // it defaults to ALWAYS. + UriOverrideEnforceMode uri_override_enforce_mode = 6; +} + +// HTTP target. +// +// When specified as a [Queue][target_type], all the tasks with [HttpRequest] +// will be overridden according to the target. +message HttpTarget { + // Defines a header message. A header can have a key and a value. + message Header { + // The Key of the header. + string key = 1; + + // The Value of the header. + string value = 2; + } + + // Wraps the Header object. + message HeaderOverride { + // header embodying a key and a value. + Header header = 1; + } + + // URI override. + // + // When specified, overrides the execution URI for all the tasks in the queue. + UriOverride uri_override = 1; + + // The HTTP method to use for the request. + // + // When specified, it overrides + // [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the + // task. Note that if the value is set to [HttpMethod][GET] the + // [HttpRequest][body] of the task will be ignored at execution time. + HttpMethod http_method = 2; + + // HTTP target headers. + // + // This map contains the header field names and values. + // Headers will be set when running the + // [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or + // [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + // + // These headers represent a subset of the headers that will be configured for + // the task's HTTP request. Some HTTP request headers will be ignored or + // replaced. + // + // A partial list of headers that will be ignored or replaced is: + // * Several predefined headers, prefixed with "X-CloudTasks-", can + // be used to define properties of the task. + // * Host: This will be computed by Cloud Tasks and derived from + // [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + // * Content-Length: This will be computed by Cloud Tasks. + // + // `Content-Type` won't be set by Cloud Tasks. You can explicitly set + // `Content-Type` to a media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example,`Content-Type` can be set to `"application/octet-stream"` or + // `"application/json"`. The default value is set to "application/json"`. + // + // * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + // + // Headers which can have multiple values (according to RFC2616) can be + // specified using comma-separated values. + // + // The size of the headers must be less than 80KB. + // Queue-level headers to override headers of all the tasks in the queue. + repeated HeaderOverride header_overrides = 3; + + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the + // [HttpRequest.headers][google.cloud.tasks.v2beta3.HttpRequest.headers] field + // will be overridden. + oneof authorization_header { + // If specified, an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + // will be generated and attached as the `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OAuthToken oauth_token = 5; + + // If specified, an + // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in the + // HTTP request. + // + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. + OidcToken oidc_token = 6; + } +} + // HTTP request. // // The task will be pushed to the worker as an HTTP request. If the worker @@ -103,6 +288,9 @@ message HttpRequest { // // A partial list of headers that will be ignored or replaced is: // + // * Any header that is prefixed with "X-CloudTasks-" will be treated + // as service header. Service headers define properties of the task and are + // predefined in CloudTask. // * Host: This will be computed by Cloud Tasks and derived from // [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. // * Content-Length: This will be computed by Cloud Tasks. diff --git a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto index ef32f9b18ec4..eb8df59f2c20 100644 --- a/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto +++ b/java-tasks/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/AsyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..661807d5f277 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2.samples; + +// [START cloudtasks_v2_generated_CloudTasks_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END cloudtasks_v2_generated_CloudTasks_GetLocation_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/SyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..e609e638dd45 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.tasks.v2.samples; + +// [START cloudtasks_v2_generated_CloudTasks_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudTasksClient.getLocation(request); + } + } +} +// [END cloudtasks_v2_generated_CloudTasks_GetLocation_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..b7e5867f6099 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.tasks.v2.samples; + +// [START cloudtasks_v2_generated_CloudTasks_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudTasksClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2_generated_CloudTasks_ListLocations_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocationsPaged.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..1988c0552807 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.tasks.v2.samples; + +// [START cloudtasks_v2_generated_CloudTasks_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.tasks.v2.CloudTasksClient; +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudTasksClient.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 cloudtasks_v2_generated_CloudTasks_ListLocations_Paged_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/SyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..331818f68742 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2/cloudtasks/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.tasks.v2.samples; + +// [START cloudtasks_v2_generated_CloudTasks_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudTasksClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2_generated_CloudTasks_ListLocations_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/AsyncBufferTask.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/AsyncBufferTask.java new file mode 100644 index 000000000000..241b38cbb8c6 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/AsyncBufferTask.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_BufferTask_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class AsyncBufferTask { + + public static void main(String[] args) throws Exception { + asyncBufferTask(); + } + + public static void asyncBufferTask() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTaskId("taskId-880873088") + .setBody(HttpBody.newBuilder().build()) + .build(); + ApiFuture future = + cloudTasksClient.bufferTaskCallable().futureCall(request); + // Do something. + BufferTaskResponse response = future.get(); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_BufferTask_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTask.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTask.java new file mode 100644 index 000000000000..a6a754001c85 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_BufferTask_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta2.BufferTaskRequest; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncBufferTask { + + public static void main(String[] args) throws Exception { + syncBufferTask(); + } + + public static void syncBufferTask() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTaskId("taskId-880873088") + .setBody(HttpBody.newBuilder().build()) + .build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(request); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_BufferTask_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java new file mode 100644 index 000000000000..534f2c3acfa2 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_BufferTask_QueuenameStringHttpbody_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncBufferTaskQueuenameStringHttpbody { + + public static void main(String[] args) throws Exception { + syncBufferTaskQueuenameStringHttpbody(); + } + + public static void syncBufferTaskQueuenameStringHttpbody() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_BufferTask_QueuenameStringHttpbody_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java new file mode 100644 index 000000000000..a588e8331496 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_BufferTask_StringStringHttpbody_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta2.BufferTaskResponse; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.QueueName; + +public class SyncBufferTaskStringStringHttpbody { + + public static void main(String[] args) throws Exception { + syncBufferTaskStringStringHttpbody(); + } + + public static void syncBufferTaskStringStringHttpbody() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_BufferTask_StringStringHttpbody_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getiampolicy/SyncGetIamPolicyString.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getiampolicy/SyncGetIamPolicyString.java index b9bb41fd153b..57fe1c48f1e3 100644 --- a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getiampolicy/SyncGetIamPolicyString.java +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getiampolicy/SyncGetIamPolicyString.java @@ -18,7 +18,7 @@ // [START cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_String_sync] import com.google.cloud.tasks.v2beta2.CloudTasksClient; -import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.LocationName; import com.google.iam.v1.Policy; public class SyncGetIamPolicyString { @@ -34,7 +34,7 @@ public static void syncGetIamPolicyString() throws Exception { // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Policy response = cloudTasksClient.getIamPolicy(resource); } } diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/AsyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..b464b56ec4b8 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetLocation_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/SyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..141851cbdad8 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudTasksClient.getLocation(request); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetLocation_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..3e60c27bd4a8 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudTasksClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_ListLocations_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocationsPaged.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..a11dca1e6cc1 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_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.tasks.v2beta2.CloudTasksClient; +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudTasksClient.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 cloudtasks_v2beta2_generated_CloudTasks_ListLocations_Paged_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/SyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..dd1d6050fbcb --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudTasksClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_ListLocations_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/setiampolicy/SyncSetIamPolicyStringPolicy.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/setiampolicy/SyncSetIamPolicyStringPolicy.java index 517fb5a33af5..d5b4504e5b50 100644 --- a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/setiampolicy/SyncSetIamPolicyStringPolicy.java +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -18,7 +18,7 @@ // [START cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_StringPolicy_sync] import com.google.cloud.tasks.v2beta2.CloudTasksClient; -import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.LocationName; import com.google.iam.v1.Policy; public class SyncSetIamPolicyStringPolicy { @@ -34,7 +34,7 @@ public static void syncSetIamPolicyStringPolicy() throws Exception { // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Policy policy = Policy.newBuilder().build(); Policy response = cloudTasksClient.setIamPolicy(resource, policy); } diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/testiampermissions/SyncTestIamPermissionsStringListstring.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/testiampermissions/SyncTestIamPermissionsStringListstring.java index c39965f56a66..503e2de278d9 100644 --- a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/testiampermissions/SyncTestIamPermissionsStringListstring.java +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/testiampermissions/SyncTestIamPermissionsStringListstring.java @@ -18,7 +18,7 @@ // [START cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_StringListstring_sync] import com.google.cloud.tasks.v2beta2.CloudTasksClient; -import com.google.cloud.tasks.v2beta2.QueueName; +import com.google.cloud.tasks.v2beta2.LocationName; import com.google.iam.v1.TestIamPermissionsResponse; import java.util.ArrayList; import java.util.List; @@ -36,7 +36,7 @@ public static void syncTestIamPermissionsStringListstring() throws Exception { // - 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { - String resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List permissions = new ArrayList<>(); TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(resource, permissions); diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/AsyncUploadQueueYaml.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/AsyncUploadQueueYaml.java new file mode 100644 index 000000000000..1f8b116293ca --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/AsyncUploadQueueYaml.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; +import com.google.protobuf.Empty; + +public class AsyncUploadQueueYaml { + + public static void main(String[] args) throws Exception { + asyncUploadQueueYaml(); + } + + public static void asyncUploadQueueYaml() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UploadQueueYamlRequest request = + UploadQueueYamlRequest.newBuilder() + .setAppId("appId93028124") + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + ApiFuture future = cloudTasksClient.uploadQueueYamlCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/SyncUploadQueueYaml.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/SyncUploadQueueYaml.java new file mode 100644 index 000000000000..5ea28e774c30 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta2/cloudtasks/uploadqueueyaml/SyncUploadQueueYaml.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.tasks.v2beta2.samples; + +// [START cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta2.CloudTasksClient; +import com.google.cloud.tasks.v2beta2.UploadQueueYamlRequest; +import com.google.protobuf.Empty; + +public class SyncUploadQueueYaml { + + public static void main(String[] args) throws Exception { + syncUploadQueueYaml(); + } + + public static void syncUploadQueueYaml() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + UploadQueueYamlRequest request = + UploadQueueYamlRequest.newBuilder() + .setAppId("appId93028124") + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + cloudTasksClient.uploadQueueYaml(request); + } + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/AsyncBufferTask.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/AsyncBufferTask.java new file mode 100644 index 000000000000..e811978162fa --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/AsyncBufferTask.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async] +import com.google.api.HttpBody; +import com.google.api.core.ApiFuture; +import com.google.cloud.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class AsyncBufferTask { + + public static void main(String[] args) throws Exception { + asyncBufferTask(); + } + + public static void asyncBufferTask() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTaskId("taskId-880873088") + .setBody(HttpBody.newBuilder().build()) + .build(); + ApiFuture future = + cloudTasksClient.bufferTaskCallable().futureCall(request); + // Do something. + BufferTaskResponse response = future.get(); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTask.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTask.java new file mode 100644 index 000000000000..5b305666cb75 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTask.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta3.BufferTaskRequest; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncBufferTask { + + public static void main(String[] args) throws Exception { + syncBufferTask(); + } + + public static void syncBufferTask() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + BufferTaskRequest request = + BufferTaskRequest.newBuilder() + .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) + .setTaskId("taskId-880873088") + .setBody(HttpBody.newBuilder().build()) + .build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(request); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java new file mode 100644 index 000000000000..052d6c6fd024 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskQueuenameStringHttpbody.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_QueuenameStringHttpbody_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncBufferTaskQueuenameStringHttpbody { + + public static void main(String[] args) throws Exception { + syncBufferTaskQueuenameStringHttpbody(); + } + + public static void syncBufferTaskQueuenameStringHttpbody() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_QueuenameStringHttpbody_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java new file mode 100644 index 000000000000..18955dd58fc4 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/buffertask/SyncBufferTaskStringStringHttpbody.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_BufferTask_StringStringHttpbody_sync] +import com.google.api.HttpBody; +import com.google.cloud.tasks.v2beta3.BufferTaskResponse; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; +import com.google.cloud.tasks.v2beta3.QueueName; + +public class SyncBufferTaskStringStringHttpbody { + + public static void main(String[] args) throws Exception { + syncBufferTaskStringStringHttpbody(); + } + + public static void syncBufferTaskStringStringHttpbody() 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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + String queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); + String taskId = "taskId-880873088"; + HttpBody body = HttpBody.newBuilder().build(); + BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_BufferTask_StringStringHttpbody_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/AsyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..01e8211391fc --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudTasksClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetLocation_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/SyncGetLocation.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..ecab7d5dca67 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudTasksClient.getLocation(request); + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetLocation_sync] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..0b710d398723 --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudTasksClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_ListLocations_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocationsPaged.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..e01db791e18e --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_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.tasks.v2beta3.CloudTasksClient; +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudTasksClient.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 cloudtasks_v2beta3_generated_CloudTasks_ListLocations_Paged_async] diff --git a/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/SyncListLocations.java b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..c2b18ecc339a --- /dev/null +++ b/java-tasks/samples/snippets/generated/com/google/cloud/tasks/v2beta3/cloudtasks/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.tasks.v2beta3.samples; + +// [START cloudtasks_v2beta3_generated_CloudTasks_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.tasks.v2beta3.CloudTasksClient; + +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 (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudTasksClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_ListLocations_sync]