From 9ef0c0edbf0d4cc7c581fc13741fd5d6bb77cae1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Mon, 25 Feb 2019 09:12:19 -0800 Subject: [PATCH] Regenerate tasks client (#4550) --- .../cloud/tasks/v2beta3/HttpRequest.java | 1450 +++++++++++++++++ .../tasks/v2beta3/HttpRequestOrBuilder.java | 232 +++ .../com/google/cloud/tasks/v2beta3/Queue.java | 12 + .../cloud/tasks/v2beta3/QueueOrBuilder.java | 3 + .../cloud/tasks/v2beta3/TargetProto.java | 75 +- .../com/google/cloud/tasks/v2beta3/Task.java | 406 ++++- .../cloud/tasks/v2beta3/TaskOrBuilder.java | 60 +- .../google/cloud/tasks/v2beta3/TaskProto.java | 45 +- .../cloud/tasks/v2beta3/cloudtasks.proto | 2 +- .../google/cloud/tasks/v2beta3/queue.proto | 3 +- .../google/cloud/tasks/v2beta3/target.proto | 87 +- .../google/cloud/tasks/v2beta3/task.proto | 19 +- .../google-cloud-tasks/synth.metadata | 10 +- 13 files changed, 2335 insertions(+), 69 deletions(-) create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java new file mode 100644 index 000000000000..47400c046f53 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequest.java @@ -0,0 +1,1450 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * HTTP request.
+ * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+ * feature. If you haven't already joined, you can [use this form to sign
+ * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+ * The task will be pushed to the worker as an HTTP request. If the worker
+ * or the redirected worker acknowledges the task by returning a successful HTTP
+ * response code ([`200` - `299`]), the task will removed from the queue. If
+ * any other HTTP response code is returned or no response is received, the
+ * task will be retried according to the following:
+ * * User-specified throttling: [retry configuration][Queue.RetryConfig],
+ *   [rate limits][Queue.RateLimits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state].
+ * * System throttling: To prevent the worker from overloading, Cloud Tasks may
+ *   temporarily reduce the queue's effective rate. User-specified settings
+ *   will not be changed.
+ *  System throttling happens because:
+ *   * Cloud Tasks backoffs on all errors. Normally the backoff specified in
+ *     [rate limits][Queue.RateLimits] will be used. But if the worker returns
+ *     `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
+ *     errors is high, Cloud Tasks will use a higher backoff rate. The retry
+ *     specified in the `Retry-After` HTTP response header is considered.
+ *   * To prevent traffic spikes and to smooth sudden large traffic spikes,
+ *     dispatches ramp up slowly when the queue is newly created or idle and
+ *     if large numbers of tasks suddenly become available to dispatch (due to
+ *     spikes in create task rates, the queue being unpaused, or many tasks
+ *     that are scheduled at the same time).
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpRequest} + */ +public final class HttpRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.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 + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HttpRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + httpMethod_ = rawValue; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + headers_ = + com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry headers__ = + input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headers_.getMutableMap().put(headers__.getKey(), headers__.getValue()); + break; + } + case 34: + { + body_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_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.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpRequest.class, + com.google.cloud.tasks.v2beta3.HttpRequest.Builder.class); + } + + private int bitField0_; + public static final int URL_FIELD_NUMBER = 1; + 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; + */ + 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; + */ + 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_; + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.tasks.v2beta3.HttpMethod result = + com.google.cloud.tasks.v2beta3.HttpMethod.valueOf(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta3.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.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + 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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 java.lang.String getHeadersOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + 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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + 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_; + /** + * + * + *
+   * HTTP request body.
+   * A request body is allowed only if the
+   * [HTTP method][google.cloud.tasks.v2beta3.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.v2beta3.HttpMethod].
+   * 
+ * + * bytes body = 4; + */ + public com.google.protobuf.ByteString getBody() { + return 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta3.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_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (httpMethod_ + != com.google.cloud.tasks.v2beta3.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_); + } + size += unknownFields.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.HttpRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.HttpRequest other = + (com.google.cloud.tasks.v2beta3.HttpRequest) obj; + + boolean result = true; + result = result && getUrl().equals(other.getUrl()); + result = result && httpMethod_ == other.httpMethod_; + result = result && internalGetHeaders().equals(other.internalGetHeaders()); + result = result && getBody().equals(other.getBody()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.HttpRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.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.v2beta3.HttpRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.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.v2beta3.HttpRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.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.v2beta3.HttpRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.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.v2beta3.HttpRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.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.v2beta3.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.v2beta3.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.v2beta3.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.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * The task will be pushed to the worker as an HTTP request. If the worker
+   * or the redirected worker acknowledges the task by returning a successful HTTP
+   * response code ([`200` - `299`]), the task will removed from the queue. If
+   * any other HTTP response code is returned or no response is received, the
+   * task will be retried according to the following:
+   * * User-specified throttling: [retry configuration][Queue.RetryConfig],
+   *   [rate limits][Queue.RateLimits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state].
+   * * System throttling: To prevent the worker from overloading, Cloud Tasks may
+   *   temporarily reduce the queue's effective rate. User-specified settings
+   *   will not be changed.
+   *  System throttling happens because:
+   *   * Cloud Tasks backoffs on all errors. Normally the backoff specified in
+   *     [rate limits][Queue.RateLimits] will be used. But if the worker returns
+   *     `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
+   *     errors is high, Cloud Tasks will use a higher backoff rate. The retry
+   *     specified in the `Retry-After` HTTP response header is considered.
+   *   * To prevent traffic spikes and to smooth sudden large traffic spikes,
+   *     dispatches ramp up slowly when the queue is newly created or idle and
+   *     if large numbers of tasks suddenly become available to dispatch (due to
+   *     spikes in create task rates, the queue being unpaused, or many tasks
+   *     that are scheduled at the same time).
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.HttpRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.HttpRequest) + com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_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.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.HttpRequest.class, + com.google.cloud.tasks.v2beta3.HttpRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.HttpRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + httpMethod_ = 0; + + internalGetMutableHeaders().clear(); + body_ = com.google.protobuf.ByteString.EMPTY; + + 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_HttpRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpRequest build() { + com.google.cloud.tasks.v2beta3.HttpRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.HttpRequest buildPartial() { + com.google.cloud.tasks.v2beta3.HttpRequest result = + new com.google.cloud.tasks.v2beta3.HttpRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.url_ = url_; + result.httpMethod_ = httpMethod_; + result.headers_ = internalGetHeaders(); + result.headers_.makeImmutable(); + result.body_ = body_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return (Builder) super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.HttpRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta3.HttpRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.HttpRequest other) { + if (other == com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.httpMethod_ != 0) { + setHttpMethodValue(other.getHttpMethodValue()); + } + internalGetMutableHeaders().mergeFrom(other.internalGetHeaders()); + if (other.getBody() != com.google.protobuf.ByteString.EMPTY) { + setBody(other.getBody()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.tasks.v2beta3.HttpRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta3.HttpRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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; + */ + 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; + */ + 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; + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + 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; + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + 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; + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private int httpMethod_ = 0; + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public int getHttpMethodValue() { + return httpMethod_; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public Builder setHttpMethodValue(int value) { + httpMethod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.tasks.v2beta3.HttpMethod result = + com.google.cloud.tasks.v2beta3.HttpMethod.valueOf(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta3.HttpMethod.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public Builder setHttpMethod(com.google.cloud.tasks.v2beta3.HttpMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + httpMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The HTTP method to use for the request. The default is POST.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + public Builder clearHttpMethod() { + + 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() { + onChanged(); + ; + if (headers_ == null) { + headers_ = com.google.protobuf.MapField.newMapField(HeadersDefaultEntryHolder.defaultEntry); + } + if (!headers_.isMutable()) { + headers_ = headers_.copy(); + } + 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 the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 boolean containsHeaders(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHeaders().getMap().containsKey(key); + } + /** Use {@link #getHeadersMap()} instead. */ + @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 the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + * + * + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 java.lang.String getHeadersOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + 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 the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 java.lang.String getHeadersOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeaders() { + internalGetMutableHeaders().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 java.lang.NullPointerException(); + } + internalGetMutableHeaders().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHeaders() { + return internalGetMutableHeaders().getMutableMap(); + } + /** + * + * + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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 java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHeaders().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+     * 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:
+     * * 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.
+     * * 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); + 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.v2beta3.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.v2beta3.HttpMethod].
+     * 
+ * + * bytes body = 4; + */ + public com.google.protobuf.ByteString getBody() { + return body_; + } + /** + * + * + *
+     * HTTP request body.
+     * A request body is allowed only if the
+     * [HTTP method][google.cloud.tasks.v2beta3.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.v2beta3.HttpMethod].
+     * 
+ * + * bytes body = 4; + */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + body_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * HTTP request body.
+     * A request body is allowed only if the
+     * [HTTP method][google.cloud.tasks.v2beta3.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.v2beta3.HttpMethod].
+     * 
+ * + * bytes body = 4; + */ + public Builder clearBody() { + + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(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.HttpRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.HttpRequest) + private static final com.google.cloud.tasks.v2beta3.HttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.HttpRequest(); + } + + public static com.google.cloud.tasks.v2beta3.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 { + return new HttpRequest(input, extensionRegistry); + } + }; + + 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.HttpRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java new file mode 100644 index 000000000000..dc00e5dad786 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/HttpRequestOrBuilder.java @@ -0,0 +1,232 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface HttpRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.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; + */ + 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; + */ + com.google.protobuf.ByteString getUrlBytes(); + + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + int getHttpMethodValue(); + /** + * + * + *
+   * The HTTP method to use for the request. The default is POST.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + com.google.cloud.tasks.v2beta3.HttpMethod getHttpMethod(); + + /** + * + * + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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 getHeadersOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
+   * 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:
+   * * 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.
+   * * 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.v2beta3.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.v2beta3.HttpMethod].
+   * 
+ * + * bytes body = 4; + */ + com.google.protobuf.ByteString getBody(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java index 7e6dbbc8336b..0d7d0a92e82b 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java @@ -485,6 +485,7 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -498,6 +499,7 @@ public boolean hasAppEngineHttpQueue() { *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -514,6 +516,7 @@ public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue getAppEngineHttpQueue() *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1433,6 +1436,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1446,6 +1450,7 @@ public boolean hasAppEngineHttpQueue() { *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1469,6 +1474,7 @@ public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue getAppEngineHttpQueue() *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1492,6 +1498,7 @@ public Builder setAppEngineHttpQueue(com.google.cloud.tasks.v2beta3.AppEngineHtt *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1513,6 +1520,7 @@ public Builder setAppEngineHttpQueue( *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1547,6 +1555,7 @@ public Builder mergeAppEngineHttpQueue( *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1573,6 +1582,7 @@ public Builder clearAppEngineHttpQueue() { *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1587,6 +1597,7 @@ public Builder clearAppEngineHttpQueue() { *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -1608,6 +1619,7 @@ public Builder clearAppEngineHttpQueue() { *
      * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
      * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
      * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java index 8cbc8f4e289a..1dfa11eee599 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java @@ -63,6 +63,7 @@ public interface QueueOrBuilder *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -74,6 +75,7 @@ public interface QueueOrBuilder *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; @@ -85,6 +87,7 @@ public interface QueueOrBuilder *
    * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to
    * [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
+   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto.
    * 
* * .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java index 5648bc9c4cab..1e59641bbf4b 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java @@ -12,6 +12,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -39,26 +47,31 @@ 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\032\034google/ap" - + "i/annotations.proto\"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*s\n\nHttpMethod\022\033\n\027HTTP_MET" - + "HOD_UNSPECIFIED\020\000\022\010\n\004POST\020\001\022\007\n\003GET\020\002\022\010\n\004" - + "HEAD\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\007Bp\n\036com.google.cloud.tasks.v2" - + "beta3B\013TargetProtoP\001Z?google.golang.org/" - + "genproto/googleapis/cloud/tasks/v2beta3;" - + "tasksb\006proto3" + + "i/annotations.proto\"\334\001\n\013HttpRequest\022\013\n\003u" + + "rl\030\001 \001(\t\022;\n\013http_method\030\002 \001(\0162&.google.c" + + "loud.tasks.v2beta3.HttpMethod\022E\n\007headers" + + "\030\003 \003(\01324.google.cloud.tasks.v2beta3.Http" + + "Request.HeadersEntry\022\014\n\004body\030\004 \001(\014\032.\n\014He" + + "adersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"g\n\022AppEngineHttpQueue\022Q\n\033app_engine_r" + + "outing_override\030\001 \001(\0132,.google.cloud.tas" + + "ks.v2beta3.AppEngineRouting\"\301\002\n\024AppEngin" + + "eHttpRequest\022;\n\013http_method\030\001 \001(\0162&.goog" + + "le.cloud.tasks.v2beta3.HttpMethod\022H\n\022app" + + "_engine_routing\030\002 \001(\0132,.google.cloud.tas" + + "ks.v2beta3.AppEngineRouting\022\024\n\014relative_" + + "uri\030\003 \001(\t\022N\n\007headers\030\004 \003(\0132=.google.clou" + + "d.tasks.v2beta3.AppEngineHttpRequest.Hea" + + "dersEntry\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\020AppEn" + + "gineRouting\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*s\n" + + "\nHttpMethod\022\033\n\027HTTP_METHOD_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\007Bp\n\036co" + + "m.google.cloud.tasks.v2beta3B\013TargetProt" + + "oP\001Z?google.golang.org/genproto/googleap" + + "is/cloud/tasks/v2beta3;tasksb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -74,8 +87,24 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.api.AnnotationsProto.getDescriptor(), }, assigner); - internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor = + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor, + new java.lang.String[] { + "Url", "HttpMethod", "Headers", "Body", + }); + internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_descriptor = + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_HttpRequest_HeadersEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor, @@ -83,7 +112,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "AppEngineRoutingOverride", }); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor, @@ -101,7 +130,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Key", "Value", }); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor, diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java index bb1e6a303427..1fad9414e54e 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java @@ -159,6 +159,23 @@ private Task( view_ = rawValue; break; } + case 90: + { + com.google.cloud.tasks.v2beta3.HttpRequest.Builder subBuilder = null; + if (payloadTypeCase_ == 11) { + subBuilder = + ((com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_).toBuilder(); + } + payloadType_ = + input.readMessage( + com.google.cloud.tasks.v2beta3.HttpRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_); + payloadType_ = subBuilder.buildPartial(); + } + payloadTypeCase_ = 11; + break; + } case 98: { com.google.protobuf.Duration.Builder subBuilder = null; @@ -381,6 +398,7 @@ private View(int value) { public enum PayloadTypeCase implements com.google.protobuf.Internal.EnumLite { APP_ENGINE_HTTP_REQUEST(3), + HTTP_REQUEST(11), PAYLOADTYPE_NOT_SET(0); private final int value; @@ -397,6 +415,8 @@ public static PayloadTypeCase forNumber(int value) { switch (value) { case 3: return APP_ENGINE_HTTP_REQUEST; + case 11: + return HTTP_REQUEST; case 0: return PAYLOADTYPE_NOT_SET; default: @@ -426,7 +446,8 @@ public PayloadTypeCase getPayloadTypeCase() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -461,7 +482,8 @@ public java.lang.String getName() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -534,6 +556,62 @@ public com.google.cloud.tasks.v2beta3.AppEngineHttpRequest getAppEngineHttpReque return com.google.cloud.tasks.v2beta3.AppEngineHttpRequest.getDefaultInstance(); } + public static final int HTTP_REQUEST_FIELD_NUMBER = 11; + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public boolean hasHttpRequest() { + return payloadTypeCase_ == 11; + } + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public com.google.cloud.tasks.v2beta3.HttpRequest getHttpRequest() { + if (payloadTypeCase_ == 11) { + return (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuilder() { + if (payloadTypeCase_ == 11) { + return (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + public static final int SCHEDULE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp scheduleTime_; /** @@ -638,6 +716,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -672,6 +753,9 @@ public boolean hasDispatchDeadline() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -708,6 +792,9 @@ public com.google.protobuf.Duration getDispatchDeadline() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -737,7 +824,7 @@ public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() { * *
    * Output only. The number of attempts dispatched.
-   * This count includes tasks which have been dispatched but haven't
+   * This count includes attempts which have been dispatched but haven't
    * received a response.
    * 
* @@ -923,6 +1010,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (view_ != com.google.cloud.tasks.v2beta3.Task.View.VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(10, view_); } + if (payloadTypeCase_ == 11) { + output.writeMessage(11, (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_); + } if (dispatchDeadline_ != null) { output.writeMessage(12, getDispatchDeadline()); } @@ -964,6 +1054,11 @@ public int getSerializedSize() { if (view_ != com.google.cloud.tasks.v2beta3.Task.View.VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, view_); } + if (payloadTypeCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_); + } if (dispatchDeadline_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDispatchDeadline()); } @@ -1013,6 +1108,9 @@ public boolean equals(final java.lang.Object obj) { case 3: result = result && getAppEngineHttpRequest().equals(other.getAppEngineHttpRequest()); break; + case 11: + result = result && getHttpRequest().equals(other.getHttpRequest()); + break; case 0: default: } @@ -1060,6 +1158,10 @@ public int hashCode() { hash = (37 * hash) + APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER; hash = (53 * hash) + getAppEngineHttpRequest().hashCode(); break; + case 11: + hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getHttpRequest().hashCode(); + break; case 0: default: } @@ -1281,6 +1383,13 @@ public com.google.cloud.tasks.v2beta3.Task buildPartial() { result.payloadType_ = appEngineHttpRequestBuilder_.build(); } } + if (payloadTypeCase_ == 11) { + if (httpRequestBuilder_ == null) { + result.payloadType_ = payloadType_; + } else { + result.payloadType_ = httpRequestBuilder_.build(); + } + } if (scheduleTimeBuilder_ == null) { result.scheduleTime_ = scheduleTime_; } else { @@ -1393,6 +1502,11 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.Task other) { mergeAppEngineHttpRequest(other.getAppEngineHttpRequest()); break; } + case HTTP_REQUEST: + { + mergeHttpRequest(other.getHttpRequest()); + break; + } case PAYLOADTYPE_NOT_SET: { break; @@ -1453,7 +1567,8 @@ public Builder clearPayloadType() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -1488,7 +1603,8 @@ public java.lang.String getName() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -1523,7 +1639,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -1556,7 +1673,8 @@ public Builder setName(java.lang.String value) { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -1586,7 +1704,8 @@ public Builder clearName() { * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -1826,6 +1945,244 @@ public Builder clearAppEngineHttpRequest() { return appEngineHttpRequestBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpRequest, + com.google.cloud.tasks.v2beta3.HttpRequest.Builder, + com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder> + httpRequestBuilder_; + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public boolean hasHttpRequest() { + return payloadTypeCase_ == 11; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public com.google.cloud.tasks.v2beta3.HttpRequest getHttpRequest() { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 11) { + return (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } else { + if (payloadTypeCase_ == 11) { + return httpRequestBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public Builder setHttpRequest(com.google.cloud.tasks.v2beta3.HttpRequest value) { + if (httpRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payloadType_ = value; + onChanged(); + } else { + httpRequestBuilder_.setMessage(value); + } + payloadTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public Builder setHttpRequest( + com.google.cloud.tasks.v2beta3.HttpRequest.Builder builderForValue) { + if (httpRequestBuilder_ == null) { + payloadType_ = builderForValue.build(); + onChanged(); + } else { + httpRequestBuilder_.setMessage(builderForValue.build()); + } + payloadTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public Builder mergeHttpRequest(com.google.cloud.tasks.v2beta3.HttpRequest value) { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 11 + && payloadType_ != com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance()) { + payloadType_ = + com.google.cloud.tasks.v2beta3.HttpRequest.newBuilder( + (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_) + .mergeFrom(value) + .buildPartial(); + } else { + payloadType_ = value; + } + onChanged(); + } else { + if (payloadTypeCase_ == 11) { + httpRequestBuilder_.mergeFrom(value); + } + httpRequestBuilder_.setMessage(value); + } + payloadTypeCase_ = 11; + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public Builder clearHttpRequest() { + if (httpRequestBuilder_ == null) { + if (payloadTypeCase_ == 11) { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + } + } else { + if (payloadTypeCase_ == 11) { + payloadTypeCase_ = 0; + payloadType_ = null; + } + httpRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public com.google.cloud.tasks.v2beta3.HttpRequest.Builder getHttpRequestBuilder() { + return getHttpRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + public com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuilder() { + if ((payloadTypeCase_ == 11) && (httpRequestBuilder_ != null)) { + return httpRequestBuilder_.getMessageOrBuilder(); + } else { + if (payloadTypeCase_ == 11) { + return (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * HTTP request that is sent to the task's target.
+     * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+     * feature. If you haven't already joined, you can [use this form to sign
+     * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+     * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpRequest, + com.google.cloud.tasks.v2beta3.HttpRequest.Builder, + com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder> + getHttpRequestFieldBuilder() { + if (httpRequestBuilder_ == null) { + if (!(payloadTypeCase_ == 11)) { + payloadType_ = com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); + } + httpRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.HttpRequest, + com.google.cloud.tasks.v2beta3.HttpRequest.Builder, + com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder>( + (com.google.cloud.tasks.v2beta3.HttpRequest) payloadType_, + getParentForChildren(), + isClean()); + payloadType_ = null; + } + payloadTypeCase_ = 11; + onChanged(); + ; + return httpRequestBuilder_; + } + private com.google.protobuf.Timestamp scheduleTime_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -2232,6 +2589,9 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2266,6 +2626,9 @@ public boolean hasDispatchDeadline() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2306,6 +2669,9 @@ public com.google.protobuf.Duration getDispatchDeadline() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2350,6 +2716,9 @@ public Builder setDispatchDeadline(com.google.protobuf.Duration value) { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2391,6 +2760,9 @@ public Builder setDispatchDeadline(com.google.protobuf.Duration.Builder builderF * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2439,6 +2811,9 @@ public Builder mergeDispatchDeadline(com.google.protobuf.Duration value) { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2481,6 +2856,9 @@ public Builder clearDispatchDeadline() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2517,6 +2895,9 @@ public com.google.protobuf.Duration.Builder getDispatchDeadlineBuilder() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2557,6 +2938,9 @@ public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() { * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -2598,7 +2982,7 @@ public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() { * *
      * Output only. The number of attempts dispatched.
-     * This count includes tasks which have been dispatched but haven't
+     * This count includes attempts which have been dispatched but haven't
      * received a response.
      * 
* @@ -2612,7 +2996,7 @@ public int getDispatchCount() { * *
      * Output only. The number of attempts dispatched.
-     * This count includes tasks which have been dispatched but haven't
+     * This count includes attempts which have been dispatched but haven't
      * received a response.
      * 
* @@ -2629,7 +3013,7 @@ public Builder setDispatchCount(int value) { * *
      * Output only. The number of attempts dispatched.
-     * This count includes tasks which have been dispatched but haven't
+     * This count includes attempts which have been dispatched but haven't
      * received a response.
      * 
* diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java index e4a3d509d648..5e0fcb17efbb 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java @@ -19,7 +19,8 @@ public interface TaskOrBuilder * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -44,7 +45,8 @@ public interface TaskOrBuilder * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), * hyphens (-), colons (:), or periods (.). * For more information, see - * [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * * `LOCATION_ID` is the canonical ID for the task's location. * The list of available locations can be obtained by calling * [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -93,6 +95,49 @@ public interface TaskOrBuilder */ com.google.cloud.tasks.v2beta3.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + boolean hasHttpRequest(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + com.google.cloud.tasks.v2beta3.HttpRequest getHttpRequest(); + /** + * + * + *
+   * HTTP request that is sent to the task's target.
+   * Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
+   * feature. If you haven't already joined, you can [use this form to sign
+   * up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
+   * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + */ + com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuilder(); + /** * * @@ -177,6 +222,9 @@ public interface TaskOrBuilder * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -209,6 +257,9 @@ public interface TaskOrBuilder * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -241,6 +292,9 @@ public interface TaskOrBuilder * worker. For example, if the worker is stuck, it may not react to cancelled * requests. * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. + * The deadline must be in the interval [15 seconds, 30 minutes]. * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the * request has the default deadline. The default deadline depends on the * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -266,7 +320,7 @@ public interface TaskOrBuilder * *
    * Output only. The number of attempts dispatched.
-   * This count includes tasks which have been dispatched but haven't
+   * This count includes attempts which have been dispatched but haven't
    * received a response.
    * 
* diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java index 4626a02162e9..0ad72df7f7c9 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java @@ -34,29 +34,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "annotations.proto\032\'google/cloud/tasks/v2" + "beta3/target.proto\032\036google/protobuf/dura" + "tion.proto\032\037google/protobuf/timestamp.pr" - + "oto\032\027google/rpc/status.proto\"\242\004\n\004Task\022\014\n" + + "oto\032\027google/rpc/status.proto\"\343\004\n\004Task\022\014\n" + "\004name\030\001 \001(\t\022S\n\027app_engine_http_request\030\003" + " \001(\01320.google.cloud.tasks.v2beta3.AppEng" - + "ineHttpRequestH\000\0221\n\rschedule_time\030\004 \001(\0132" - + "\032.google.protobuf.Timestamp\022/\n\013create_ti" - + "me\030\005 \001(\0132\032.google.protobuf.Timestamp\0224\n\021" - + "dispatch_deadline\030\014 \001(\0132\031.google.protobu" - + "f.Duration\022\026\n\016dispatch_count\030\006 \001(\005\022\026\n\016re" - + "sponse_count\030\007 \001(\005\022:\n\rfirst_attempt\030\010 \001(" - + "\0132#.google.cloud.tasks.v2beta3.Attempt\0229" - + "\n\014last_attempt\030\t \001(\0132#.google.cloud.task" - + "s.v2beta3.Attempt\0223\n\004view\030\n \001(\0162%.google" - + ".cloud.tasks.v2beta3.Task.View\"1\n\004View\022\024" - + "\n\020VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020" - + "\002B\016\n\014payload_type\"\317\001\n\007Attempt\0221\n\rschedul" - + "e_time\030\001 \001(\0132\032.google.protobuf.Timestamp" - + "\0221\n\rdispatch_time\030\002 \001(\0132\032.google.protobu" - + "f.Timestamp\0221\n\rresponse_time\030\003 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022+\n\017response_statu" - + "s\030\004 \001(\0132\022.google.rpc.StatusBn\n\036com.googl" - + "e.cloud.tasks.v2beta3B\tTaskProtoP\001Z?goog" - + "le.golang.org/genproto/googleapis/cloud/" - + "tasks/v2beta3;tasksb\006proto3" + + "ineHttpRequestH\000\022?\n\014http_request\030\013 \001(\0132\'" + + ".google.cloud.tasks.v2beta3.HttpRequestH" + + "\000\0221\n\rschedule_time\030\004 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013create_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\0224\n\021dispatch_deadli" + + "ne\030\014 \001(\0132\031.google.protobuf.Duration\022\026\n\016d" + + "ispatch_count\030\006 \001(\005\022\026\n\016response_count\030\007 " + + "\001(\005\022:\n\rfirst_attempt\030\010 \001(\0132#.google.clou" + + "d.tasks.v2beta3.Attempt\0229\n\014last_attempt\030" + + "\t \001(\0132#.google.cloud.tasks.v2beta3.Attem" + + "pt\0223\n\004view\030\n \001(\0162%.google.cloud.tasks.v2" + + "beta3.Task.View\"1\n\004View\022\024\n\020VIEW_UNSPECIF" + + "IED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\016\n\014payload_ty" + + "pe\"\317\001\n\007Attempt\0221\n\rschedule_time\030\001 \001(\0132\032." + + "google.protobuf.Timestamp\0221\n\rdispatch_ti" + + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\0221\n\r" + + "response_time\030\003 \001(\0132\032.google.protobuf.Ti" + + "mestamp\022+\n\017response_status\030\004 \001(\0132\022.googl" + + "e.rpc.StatusBn\n\036com.google.cloud.tasks.v" + + "2beta3B\tTaskProtoP\001Z?google.golang.org/g" + + "enproto/googleapis/cloud/tasks/v2beta3;t" + + "asksb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -84,6 +86,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Name", "AppEngineHttpRequest", + "HttpRequest", "ScheduleTime", "CreateTime", "DispatchDeadline", diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto index fcdd9cf9e558..5eef8b3c826d 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 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/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto index 4b6b92663651..a4399014a243 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -92,6 +92,7 @@ message Queue { oneof queue_type { // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto. AppEngineHttpQueue app_engine_http_queue = 3; } diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto index 087249f93d2c..407c2b66623c 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,91 @@ option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2beta3"; +// HTTP request. +// +// Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages) +// feature. If you haven't already joined, you can [use this form to sign +// up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link). +// +// The task will be pushed to the worker as an HTTP request. If the worker +// or the redirected worker acknowledges the task by returning a successful HTTP +// response code ([`200` - `299`]), the task will removed from the queue. If +// any other HTTP response code is returned or no response is received, the +// task will be retried according to the following: +// +// * User-specified throttling: [retry configuration][Queue.RetryConfig], +// [rate limits][Queue.RateLimits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state]. +// +// * System throttling: To prevent the worker from overloading, Cloud Tasks may +// temporarily reduce the queue's effective rate. User-specified settings +// will not be changed. +// +// System throttling happens because: +// +// * Cloud Tasks backoffs on all errors. Normally the backoff specified in +// [rate limits][Queue.RateLimits] will be used. But if the worker returns +// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of +// errors is high, Cloud Tasks will use a higher backoff rate. The retry +// specified in the `Retry-After` HTTP response header is considered. +// +// * To prevent traffic spikes and to smooth sudden large traffic spikes, +// dispatches ramp up slowly when the queue is newly created or idle and +// if large numbers of tasks suddenly become available to dispatch (due to +// spikes in create task rates, the queue being unpaused, or many tasks +// that are scheduled at the same time). +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; + + // 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 the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // + // 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: + // + // * 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. + // * 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.v2beta3.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.v2beta3.HttpMethod]. + bytes body = 4; +} + // App Engine HTTP queue. // // The task will be delivered to the App Engine application hostname diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto index 46026f70e62f..e4c474fd7a27 100644 --- a/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -70,7 +70,8 @@ message Task { // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), // hyphens (-), colons (:), or periods (.). // For more information, see - // [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) // * `LOCATION_ID` is the canonical ID for the task's location. // The list of available locations can be obtained by calling // [ListLocations][google.cloud.location.Locations.ListLocations]. @@ -87,6 +88,15 @@ message Task { // // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set. AppEngineHttpRequest app_engine_http_request = 3; + + // HTTP request that is sent to the task's target. + // + // Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages) + // feature. If you haven't already joined, you can [use this form to sign + // up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link). + // + // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + HttpRequest http_request = 11; } // The time when the task is scheduled to be attempted. @@ -113,6 +123,9 @@ message Task { // // The default and maximum values depend on the type of request: // + // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + // 10 minutes. + // The deadline must be in the interval [15 seconds, 30 minutes]. // // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the // request has the default deadline. The default deadline depends on the @@ -133,7 +146,7 @@ message Task { // Output only. The number of attempts dispatched. // - // This count includes tasks which have been dispatched but haven't + // This count includes attempts which have been dispatched but haven't // received a response. int32 dispatch_count = 6; diff --git a/google-cloud-clients/google-cloud-tasks/synth.metadata b/google-cloud-clients/google-cloud-tasks/synth.metadata index f64d2446efe3..156ca3ebbf11 100644 --- a/google-cloud-clients/google-cloud-tasks/synth.metadata +++ b/google-cloud-clients/google-cloud-tasks/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-26T08:48:51.639044Z", + "updateTime": "2019-02-24T08:52:15.895588Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.7", - "dockerImage": "googleapis/artman@sha256:d6c8ced606eb49973ca95d2af7c55a681acc042db0f87d135968349e7bf6dd80" + "version": "0.16.14", + "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a6b4398490269577fc511f297b85763ba4701403", - "internalRef": "230969086" + "sha": "59f2494f1b00511bbb813d647cfbe95c949de0fe", + "internalRef": "235350912" } } ],