diff --git a/proto-google-cloud-tasks-v2/clirr-ignored-differences.xml b/proto-google-cloud-tasks-v2/clirr-ignored-differences.xml
new file mode 100644
index 00000000..152b47f1
--- /dev/null
+++ b/proto-google-cloud-tasks-v2/clirr-ignored-differences.xml
@@ -0,0 +1,19 @@
+
+
+
+ * HTTP request. + * 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][google.cloud.tasks.v2.Queue.retry_config], + * [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2.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 backs off on all errors. Normally the backoff specified in + * [rate limits][google.cloud.tasks.v2.Queue.rate_limits] 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.v2.HttpRequest} + */ +public final class HttpRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2.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) != 0)) { + headers_ = + com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry
+ * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ public java.lang.String getUrl() {
+ java.lang.Object ref = url_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ 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.v2.HttpMethod http_method = 2;
+ */
+ public int getHttpMethodValue() {
+ return httpMethod_;
+ }
+ /**
+ *
+ *
+ * + * The HTTP method to use for the request. The default is POST. + *+ * + *
.google.cloud.tasks.v2.HttpMethod http_method = 2;
+ */
+ public com.google.cloud.tasks.v2.HttpMethod getHttpMethod() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.tasks.v2.HttpMethod result =
+ com.google.cloud.tasks.v2.HttpMethod.valueOf(httpMethod_);
+ return result == null ? com.google.cloud.tasks.v2.HttpMethod.UNRECOGNIZED : result;
+ }
+
+ public static final int HEADERS_FIELD_NUMBER = 3;
+
+ private static final class HeadersDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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+ * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.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.v2.HttpMethod]. + *+ * + *
bytes body = 4;
+ */
+ public com.google.protobuf.ByteString getBody() {
+ return body_;
+ }
+
+ public static final int OAUTH_TOKEN_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public boolean hasOauthToken() {
+ return authorizationHeaderCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public com.google.cloud.tasks.v2.OAuthToken getOauthToken() {
+ if (authorizationHeaderCase_ == 5) {
+ return (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public com.google.cloud.tasks.v2.OAuthTokenOrBuilder getOauthTokenOrBuilder() {
+ if (authorizationHeaderCase_ == 5) {
+ return (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ }
+
+ public static final int OIDC_TOKEN_FIELD_NUMBER = 6;
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public boolean hasOidcToken() {
+ return authorizationHeaderCase_ == 6;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public com.google.cloud.tasks.v2.OidcToken getOidcToken() {
+ if (authorizationHeaderCase_ == 6) {
+ return (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public com.google.cloud.tasks.v2.OidcTokenOrBuilder getOidcTokenOrBuilder() {
+ if (authorizationHeaderCase_ == 6) {
+ return (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getUrlBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
+ }
+ if (httpMethod_ != com.google.cloud.tasks.v2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) {
+ output.writeEnum(2, httpMethod_);
+ }
+ com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
+ output, internalGetHeaders(), HeadersDefaultEntryHolder.defaultEntry, 3);
+ if (!body_.isEmpty()) {
+ output.writeBytes(4, body_);
+ }
+ if (authorizationHeaderCase_ == 5) {
+ output.writeMessage(5, (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_);
+ }
+ if (authorizationHeaderCase_ == 6) {
+ output.writeMessage(6, (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_);
+ }
+ 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.v2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, httpMethod_);
+ }
+ for (java.util.Map.Entry+ * HTTP request. + * 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][google.cloud.tasks.v2.Queue.retry_config], + * [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2.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 backs off on all errors. Normally the backoff specified in + * [rate limits][google.cloud.tasks.v2.Queue.rate_limits] 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.v2.HttpRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ public java.lang.String getUrl() {
+ java.lang.Object ref = url_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ url_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ public com.google.protobuf.ByteString getUrlBytes() {
+ java.lang.Object ref = url_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ url_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ 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 [(.google.api.field_behavior) = REQUIRED];
+ */
+ 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 [(.google.api.field_behavior) = REQUIRED];
+ */
+ 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.v2.HttpMethod http_method = 2;
+ */
+ public int getHttpMethodValue() {
+ return httpMethod_;
+ }
+ /**
+ *
+ *
+ * + * The HTTP method to use for the request. The default is POST. + *+ * + *
.google.cloud.tasks.v2.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.v2.HttpMethod http_method = 2;
+ */
+ public com.google.cloud.tasks.v2.HttpMethod getHttpMethod() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.tasks.v2.HttpMethod result =
+ com.google.cloud.tasks.v2.HttpMethod.valueOf(httpMethod_);
+ return result == null ? com.google.cloud.tasks.v2.HttpMethod.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ * + * The HTTP method to use for the request. The default is POST. + *+ * + *
.google.cloud.tasks.v2.HttpMethod http_method = 2;
+ */
+ public Builder setHttpMethod(com.google.cloud.tasks.v2.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.v2.HttpMethod http_method = 2;
+ */
+ public Builder clearHttpMethod() {
+
+ httpMethod_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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+ * 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.v2.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.v2.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+ * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.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.v2.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.v2.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.v2.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.v2.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.v2.HttpMethod]. + *+ * + *
bytes body = 4;
+ */
+ public Builder clearBody() {
+
+ body_ = getDefaultInstance().getBody();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OAuthToken,
+ com.google.cloud.tasks.v2.OAuthToken.Builder,
+ com.google.cloud.tasks.v2.OAuthTokenOrBuilder>
+ oauthTokenBuilder_;
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public boolean hasOauthToken() {
+ return authorizationHeaderCase_ == 5;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public com.google.cloud.tasks.v2.OAuthToken getOauthToken() {
+ if (oauthTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 5) {
+ return (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ } else {
+ if (authorizationHeaderCase_ == 5) {
+ return oauthTokenBuilder_.getMessage();
+ }
+ return com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public Builder setOauthToken(com.google.cloud.tasks.v2.OAuthToken value) {
+ if (oauthTokenBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ authorizationHeader_ = value;
+ onChanged();
+ } else {
+ oauthTokenBuilder_.setMessage(value);
+ }
+ authorizationHeaderCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public Builder setOauthToken(com.google.cloud.tasks.v2.OAuthToken.Builder builderForValue) {
+ if (oauthTokenBuilder_ == null) {
+ authorizationHeader_ = builderForValue.build();
+ onChanged();
+ } else {
+ oauthTokenBuilder_.setMessage(builderForValue.build());
+ }
+ authorizationHeaderCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public Builder mergeOauthToken(com.google.cloud.tasks.v2.OAuthToken value) {
+ if (oauthTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 5
+ && authorizationHeader_ != com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance()) {
+ authorizationHeader_ =
+ com.google.cloud.tasks.v2.OAuthToken.newBuilder(
+ (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ authorizationHeader_ = value;
+ }
+ onChanged();
+ } else {
+ if (authorizationHeaderCase_ == 5) {
+ oauthTokenBuilder_.mergeFrom(value);
+ }
+ oauthTokenBuilder_.setMessage(value);
+ }
+ authorizationHeaderCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public Builder clearOauthToken() {
+ if (oauthTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 5) {
+ authorizationHeaderCase_ = 0;
+ authorizationHeader_ = null;
+ onChanged();
+ }
+ } else {
+ if (authorizationHeaderCase_ == 5) {
+ authorizationHeaderCase_ = 0;
+ authorizationHeader_ = null;
+ }
+ oauthTokenBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public com.google.cloud.tasks.v2.OAuthToken.Builder getOauthTokenBuilder() {
+ return getOauthTokenFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ public com.google.cloud.tasks.v2.OAuthTokenOrBuilder getOauthTokenOrBuilder() {
+ if ((authorizationHeaderCase_ == 5) && (oauthTokenBuilder_ != null)) {
+ return oauthTokenBuilder_.getMessageOrBuilder();
+ } else {
+ if (authorizationHeaderCase_ == 5) {
+ return (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OAuthToken,
+ com.google.cloud.tasks.v2.OAuthToken.Builder,
+ com.google.cloud.tasks.v2.OAuthTokenOrBuilder>
+ getOauthTokenFieldBuilder() {
+ if (oauthTokenBuilder_ == null) {
+ if (!(authorizationHeaderCase_ == 5)) {
+ authorizationHeader_ = com.google.cloud.tasks.v2.OAuthToken.getDefaultInstance();
+ }
+ oauthTokenBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OAuthToken,
+ com.google.cloud.tasks.v2.OAuthToken.Builder,
+ com.google.cloud.tasks.v2.OAuthTokenOrBuilder>(
+ (com.google.cloud.tasks.v2.OAuthToken) authorizationHeader_,
+ getParentForChildren(),
+ isClean());
+ authorizationHeader_ = null;
+ }
+ authorizationHeaderCase_ = 5;
+ onChanged();
+ ;
+ return oauthTokenBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OidcToken,
+ com.google.cloud.tasks.v2.OidcToken.Builder,
+ com.google.cloud.tasks.v2.OidcTokenOrBuilder>
+ oidcTokenBuilder_;
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public boolean hasOidcToken() {
+ return authorizationHeaderCase_ == 6;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public com.google.cloud.tasks.v2.OidcToken getOidcToken() {
+ if (oidcTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 6) {
+ return (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ } else {
+ if (authorizationHeaderCase_ == 6) {
+ return oidcTokenBuilder_.getMessage();
+ }
+ return com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public Builder setOidcToken(com.google.cloud.tasks.v2.OidcToken value) {
+ if (oidcTokenBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ authorizationHeader_ = value;
+ onChanged();
+ } else {
+ oidcTokenBuilder_.setMessage(value);
+ }
+ authorizationHeaderCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public Builder setOidcToken(com.google.cloud.tasks.v2.OidcToken.Builder builderForValue) {
+ if (oidcTokenBuilder_ == null) {
+ authorizationHeader_ = builderForValue.build();
+ onChanged();
+ } else {
+ oidcTokenBuilder_.setMessage(builderForValue.build());
+ }
+ authorizationHeaderCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public Builder mergeOidcToken(com.google.cloud.tasks.v2.OidcToken value) {
+ if (oidcTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 6
+ && authorizationHeader_ != com.google.cloud.tasks.v2.OidcToken.getDefaultInstance()) {
+ authorizationHeader_ =
+ com.google.cloud.tasks.v2.OidcToken.newBuilder(
+ (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ authorizationHeader_ = value;
+ }
+ onChanged();
+ } else {
+ if (authorizationHeaderCase_ == 6) {
+ oidcTokenBuilder_.mergeFrom(value);
+ }
+ oidcTokenBuilder_.setMessage(value);
+ }
+ authorizationHeaderCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public Builder clearOidcToken() {
+ if (oidcTokenBuilder_ == null) {
+ if (authorizationHeaderCase_ == 6) {
+ authorizationHeaderCase_ = 0;
+ authorizationHeader_ = null;
+ onChanged();
+ }
+ } else {
+ if (authorizationHeaderCase_ == 6) {
+ authorizationHeaderCase_ = 0;
+ authorizationHeader_ = null;
+ }
+ oidcTokenBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public com.google.cloud.tasks.v2.OidcToken.Builder getOidcTokenBuilder() {
+ return getOidcTokenFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ public com.google.cloud.tasks.v2.OidcTokenOrBuilder getOidcTokenOrBuilder() {
+ if ((authorizationHeaderCase_ == 6) && (oidcTokenBuilder_ != null)) {
+ return oidcTokenBuilder_.getMessageOrBuilder();
+ } else {
+ if (authorizationHeaderCase_ == 6) {
+ return (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_;
+ }
+ return com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OidcToken,
+ com.google.cloud.tasks.v2.OidcToken.Builder,
+ com.google.cloud.tasks.v2.OidcTokenOrBuilder>
+ getOidcTokenFieldBuilder() {
+ if (oidcTokenBuilder_ == null) {
+ if (!(authorizationHeaderCase_ == 6)) {
+ authorizationHeader_ = com.google.cloud.tasks.v2.OidcToken.getDefaultInstance();
+ }
+ oidcTokenBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.OidcToken,
+ com.google.cloud.tasks.v2.OidcToken.Builder,
+ com.google.cloud.tasks.v2.OidcTokenOrBuilder>(
+ (com.google.cloud.tasks.v2.OidcToken) authorizationHeader_,
+ getParentForChildren(),
+ isClean());
+ authorizationHeader_ = null;
+ }
+ authorizationHeaderCase_ = 6;
+ onChanged();
+ ;
+ return oidcTokenBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2.HttpRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.HttpRequest)
+ private static final com.google.cloud.tasks.v2.HttpRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.tasks.v2.HttpRequest();
+ }
+
+ public static com.google.cloud.tasks.v2.HttpRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ java.lang.String getUrl();
+ /**
+ *
+ *
+ * + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + *+ * + *
string url = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ com.google.protobuf.ByteString getUrlBytes();
+
+ /**
+ *
+ *
+ * + * The HTTP method to use for the request. The default is POST. + *+ * + *
.google.cloud.tasks.v2.HttpMethod http_method = 2;
+ */
+ int getHttpMethodValue();
+ /**
+ *
+ *
+ * + * The HTTP method to use for the request. The default is POST. + *+ * + *
.google.cloud.tasks.v2.HttpMethod http_method = 2;
+ */
+ com.google.cloud.tasks.v2.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.v2.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.v2.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+ * 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.v2.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+ * 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.v2.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.v2.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.v2.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.v2.HttpMethod]. + *+ * + *
bytes body = 4;
+ */
+ com.google.protobuf.ByteString getBody();
+
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ boolean hasOauthToken();
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ com.google.cloud.tasks.v2.OAuthToken getOauthToken();
+ /**
+ *
+ *
+ * + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + *+ * + *
.google.cloud.tasks.v2.OAuthToken oauth_token = 5;
+ */
+ com.google.cloud.tasks.v2.OAuthTokenOrBuilder getOauthTokenOrBuilder();
+
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ boolean hasOidcToken();
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ com.google.cloud.tasks.v2.OidcToken getOidcToken();
+ /**
+ *
+ *
+ * + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + *
.google.cloud.tasks.v2.OidcToken oidc_token = 6;
+ */
+ com.google.cloud.tasks.v2.OidcTokenOrBuilder getOidcTokenOrBuilder();
+
+ public com.google.cloud.tasks.v2.HttpRequest.AuthorizationHeaderCase getAuthorizationHeaderCase();
+}
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OAuthToken.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OAuthToken.java
new file mode 100644
index 00000000..35342896
--- /dev/null
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OAuthToken.java
@@ -0,0 +1,817 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/tasks/v2/target.proto
+
+package com.google.cloud.tasks.v2;
+
+/**
+ *
+ *
+ * + * Contains information needed for generating an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2). + * This type of authorization should generally only be used when calling Google + * APIs hosted on *.googleapis.com. + *+ * + * Protobuf type {@code google.cloud.tasks.v2.OAuthToken} + */ +public final class OAuthToken extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2.OAuthToken) + OAuthTokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use OAuthToken.newBuilder() to construct. + private OAuthToken(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private OAuthToken() { + serviceAccountEmail_ = ""; + scope_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OAuthToken( + 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(); + + serviceAccountEmail_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + default: + { + if (!parseUnknownField(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.v2.TargetProto + .internal_static_google_cloud_tasks_v2_OAuthToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2.TargetProto + .internal_static_google_cloud_tasks_v2_OAuthToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2.OAuthToken.class, + com.google.cloud.tasks.v2.OAuthToken.Builder.class); + } + + public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceAccountEmail_; + /** + * + * + *
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public java.lang.String getServiceAccountEmail() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceAccountEmail_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceAccountEmail_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SCOPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object scope_;
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getServiceAccountEmailBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_);
+ }
+ if (!getScopeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scope_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getServiceAccountEmailBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_);
+ }
+ if (!getScopeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, scope_);
+ }
+ 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.v2.OAuthToken)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.tasks.v2.OAuthToken other = (com.google.cloud.tasks.v2.OAuthToken) obj;
+
+ if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false;
+ if (!getScope().equals(other.getScope())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceAccountEmail().hashCode();
+ hash = (37 * hash) + SCOPE_FIELD_NUMBER;
+ hash = (53 * hash) + getScope().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.tasks.v2.OAuthToken prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Contains information needed for generating an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2). + * This type of authorization should generally only be used when calling Google + * APIs hosted on *.googleapis.com. + *+ * + * Protobuf type {@code google.cloud.tasks.v2.OAuthToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public java.lang.String getServiceAccountEmail() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceAccountEmail_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceAccountEmail_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder setServiceAccountEmail(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceAccountEmail_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder clearServiceAccountEmail() {
+
+ serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceAccountEmail_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object scope_ = "";
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public Builder setScope(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public Builder clearScope() {
+
+ scope_ = getDefaultInstance().getScope();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2.OAuthToken)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.OAuthToken)
+ private static final com.google.cloud.tasks.v2.OAuthToken DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.tasks.v2.OAuthToken();
+ }
+
+ public static com.google.cloud.tasks.v2.OAuthToken getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ java.lang.String getServiceAccountEmail();
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ com.google.protobuf.ByteString getServiceAccountEmailBytes();
+
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ java.lang.String getScope();
+ /**
+ *
+ *
+ * + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + *+ * + *
string scope = 2;
+ */
+ com.google.protobuf.ByteString getScopeBytes();
+}
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OidcToken.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OidcToken.java
new file mode 100644
index 00000000..4d203f17
--- /dev/null
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/OidcToken.java
@@ -0,0 +1,814 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/tasks/v2/target.proto
+
+package com.google.cloud.tasks.v2;
+
+/**
+ *
+ *
+ * + * Contains information needed for generating an + * [OpenID Connect + * token](https://developers.google.com/identity/protocols/OpenIDConnect). + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + * Protobuf type {@code google.cloud.tasks.v2.OidcToken} + */ +public final class OidcToken extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2.OidcToken) + OidcTokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use OidcToken.newBuilder() to construct. + private OidcToken(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private OidcToken() { + serviceAccountEmail_ = ""; + audience_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OidcToken( + 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(); + + serviceAccountEmail_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + audience_ = s; + break; + } + default: + { + if (!parseUnknownField(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.v2.TargetProto + .internal_static_google_cloud_tasks_v2_OidcToken_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2.TargetProto + .internal_static_google_cloud_tasks_v2_OidcToken_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2.OidcToken.class, + com.google.cloud.tasks.v2.OidcToken.Builder.class); + } + + public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceAccountEmail_; + /** + * + * + *
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public java.lang.String getServiceAccountEmail() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceAccountEmail_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceAccountEmail_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int AUDIENCE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object audience_;
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public java.lang.String getAudience() {
+ java.lang.Object ref = audience_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ audience_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public com.google.protobuf.ByteString getAudienceBytes() {
+ java.lang.Object ref = audience_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ audience_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getServiceAccountEmailBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceAccountEmail_);
+ }
+ if (!getAudienceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, audience_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getServiceAccountEmailBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceAccountEmail_);
+ }
+ if (!getAudienceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, audience_);
+ }
+ 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.v2.OidcToken)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.tasks.v2.OidcToken other = (com.google.cloud.tasks.v2.OidcToken) obj;
+
+ if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false;
+ if (!getAudience().equals(other.getAudience())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceAccountEmail().hashCode();
+ hash = (37 * hash) + AUDIENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getAudience().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.tasks.v2.OidcToken prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Contains information needed for generating an + * [OpenID Connect + * token](https://developers.google.com/identity/protocols/OpenIDConnect). + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + *+ * + * Protobuf type {@code google.cloud.tasks.v2.OidcToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public java.lang.String getServiceAccountEmail() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serviceAccountEmail_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
+ java.lang.Object ref = serviceAccountEmail_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serviceAccountEmail_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder setServiceAccountEmail(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ serviceAccountEmail_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder clearServiceAccountEmail() {
+
+ serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ serviceAccountEmail_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object audience_ = "";
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public java.lang.String getAudience() {
+ java.lang.Object ref = audience_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ audience_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public com.google.protobuf.ByteString getAudienceBytes() {
+ java.lang.Object ref = audience_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ audience_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public Builder setAudience(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ audience_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public Builder clearAudience() {
+
+ audience_ = getDefaultInstance().getAudience();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ public Builder setAudienceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ audience_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2.OidcToken)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.OidcToken)
+ private static final com.google.cloud.tasks.v2.OidcToken DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.tasks.v2.OidcToken();
+ }
+
+ public static com.google.cloud.tasks.v2.OidcToken getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ java.lang.String getServiceAccountEmail();
+ /**
+ *
+ *
+ * + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + *+ * + *
string service_account_email = 1;
+ */
+ com.google.protobuf.ByteString getServiceAccountEmailBytes();
+
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ java.lang.String getAudience();
+ /**
+ *
+ *
+ * + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + *+ * + *
string audience = 2;
+ */
+ com.google.protobuf.ByteString getAudienceBytes();
+}
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java
index 498e606f..01a48483 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java
@@ -464,6 +464,7 @@ public com.google.protobuf.ByteString getNameBytes() {
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -483,6 +484,7 @@ public boolean hasAppEngineRoutingOverride() {
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -504,6 +506,7 @@ public com.google.cloud.tasks.v2.AppEngineRouting getAppEngineRoutingOverride()
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1406,6 +1409,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1425,6 +1429,7 @@ public boolean hasAppEngineRoutingOverride() {
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1450,6 +1455,7 @@ public com.google.cloud.tasks.v2.AppEngineRouting getAppEngineRoutingOverride()
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1479,6 +1485,7 @@ public Builder setAppEngineRoutingOverride(com.google.cloud.tasks.v2.AppEngineRo
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1506,6 +1513,7 @@ public Builder setAppEngineRoutingOverride(
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1539,6 +1547,7 @@ public Builder mergeAppEngineRoutingOverride(com.google.cloud.tasks.v2.AppEngine
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1566,6 +1575,7 @@ public Builder clearAppEngineRoutingOverride() {
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1587,6 +1597,7 @@ public com.google.cloud.tasks.v2.AppEngineRouting.Builder getAppEngineRoutingOve
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -1613,6 +1624,7 @@ public com.google.cloud.tasks.v2.AppEngineRouting.Builder getAppEngineRoutingOve
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
index feeb98ea..99433ef7 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
@@ -82,6 +82,7 @@ public interface QueueOrBuilder
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -99,6 +100,7 @@ public interface QueueOrBuilder
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
@@ -116,6 +118,7 @@ public interface QueueOrBuilder
* [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
* These settings apply only to
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ * [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
* If set, `app_engine_routing_override` is used for all
* [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
* setting is for the
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TargetProto.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TargetProto.java
index 9a3686aa..827fae0a 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TargetProto.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TargetProto.java
@@ -27,6 +27,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_v2_HttpRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_tasks_v2_HttpRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_tasks_v2_HttpRequest_HeadersEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_tasks_v2_HttpRequest_HeadersEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -39,6 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_tasks_v2_AppEngineRouting_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_tasks_v2_AppEngineRouting_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_tasks_v2_OAuthToken_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_tasks_v2_OAuthToken_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_tasks_v2_OidcToken_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_tasks_v2_OidcToken_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -49,23 +65,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
static {
java.lang.String[] descriptorData = {
"\n\"google/cloud/tasks/v2/target.proto\022\025go"
- + "ogle.cloud.tasks.v2\032\034google/api/annotati"
- + "ons.proto\"\262\002\n\024AppEngineHttpRequest\0226\n\013ht"
- + "tp_method\030\001 \001(\0162!.google.cloud.tasks.v2."
- + "HttpMethod\022C\n\022app_engine_routing\030\002 \001(\0132\'"
- + ".google.cloud.tasks.v2.AppEngineRouting\022"
- + "\024\n\014relative_uri\030\003 \001(\t\022I\n\007headers\030\004 \003(\01328"
- + ".google.cloud.tasks.v2.AppEngineHttpRequ"
- + "est.HeadersEntry\022\014\n\004body\030\005 \001(\014\032.\n\014Header"
- + "sEntry\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\007v"
- + "ersion\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_UNSPEC"
- + "IFIED\020\000\022\010\n\004POST\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003"
- + "PUT\020\004\022\n\n\006DELETE\020\005\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020"
- + "\007Bf\n\031com.google.cloud.tasks.v2B\013TargetPr"
- + "otoP\001Z:google.golang.org/genproto/google"
- + "apis/cloud/tasks/v2;tasksb\006proto3"
+ + "ogle.cloud.tasks.v2\032\037google/api/field_be"
+ + "havior.proto\032\034google/api/annotations.pro"
+ + "to\"\341\002\n\013HttpRequest\022\020\n\003url\030\001 \001(\tB\003\340A\002\0226\n\013"
+ + "http_method\030\002 \001(\0162!.google.cloud.tasks.v"
+ + "2.HttpMethod\022@\n\007headers\030\003 \003(\0132/.google.c"
+ + "loud.tasks.v2.HttpRequest.HeadersEntry\022\014"
+ + "\n\004body\030\004 \001(\014\0228\n\013oauth_token\030\005 \001(\0132!.goog"
+ + "le.cloud.tasks.v2.OAuthTokenH\000\0226\n\noidc_t"
+ + "oken\030\006 \001(\0132 .google.cloud.tasks.v2.OidcT"
+ + "okenH\000\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v"
+ + "alue\030\002 \001(\t:\0028\001B\026\n\024authorization_header\"\262"
+ + "\002\n\024AppEngineHttpRequest\0226\n\013http_method\030\001"
+ + " \001(\0162!.google.cloud.tasks.v2.HttpMethod\022"
+ + "C\n\022app_engine_routing\030\002 \001(\0132\'.google.clo"
+ + "ud.tasks.v2.AppEngineRouting\022\024\n\014relative"
+ + "_uri\030\003 \001(\t\022I\n\007headers\030\004 \003(\01328.google.clo"
+ + "ud.tasks.v2.AppEngineHttpRequest.Headers"
+ + "Entry\022\014\n\004body\030\005 \001(\014\032.\n\014HeadersEntry\022\013\n\003k"
+ + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020AppEngine"
+ + "Routing\022\017\n\007service\030\001 \001(\t\022\017\n\007version\030\002 \001("
+ + "\t\022\020\n\010instance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t\":\n\nOAu"
+ + "thToken\022\035\n\025service_account_email\030\001 \001(\t\022\r"
+ + "\n\005scope\030\002 \001(\t\"<\n\tOidcToken\022\035\n\025service_ac"
+ + "count_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t*s\n\nH"
+ + "ttpMethod\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\006"
+ + "DELETE\020\005\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020\007Bf\n\031com."
+ + "google.cloud.tasks.v2B\013TargetProtoP\001Z:go"
+ + "ogle.golang.org/genproto/googleapis/clou"
+ + "d/tasks/v2;tasksb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -78,11 +107,34 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.api.AnnotationsProto.getDescriptor(),
},
assigner);
- internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_descriptor =
+ internal_static_google_cloud_tasks_v2_HttpRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
+ internal_static_google_cloud_tasks_v2_HttpRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_tasks_v2_HttpRequest_descriptor,
+ new java.lang.String[] {
+ "Url",
+ "HttpMethod",
+ "Headers",
+ "Body",
+ "OauthToken",
+ "OidcToken",
+ "AuthorizationHeader",
+ });
+ internal_static_google_cloud_tasks_v2_HttpRequest_HeadersEntry_descriptor =
+ internal_static_google_cloud_tasks_v2_HttpRequest_descriptor.getNestedTypes().get(0);
+ internal_static_google_cloud_tasks_v2_HttpRequest_HeadersEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_tasks_v2_HttpRequest_HeadersEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_descriptor =
+ getDescriptor().getMessageTypes().get(1);
internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_tasks_v2_AppEngineHttpRequest_descriptor,
@@ -100,13 +152,35 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
"Key", "Value",
});
internal_static_google_cloud_tasks_v2_AppEngineRouting_descriptor =
- getDescriptor().getMessageTypes().get(1);
+ getDescriptor().getMessageTypes().get(2);
internal_static_google_cloud_tasks_v2_AppEngineRouting_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_tasks_v2_AppEngineRouting_descriptor,
new java.lang.String[] {
"Service", "Version", "Instance", "Host",
});
+ internal_static_google_cloud_tasks_v2_OAuthToken_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_cloud_tasks_v2_OAuthToken_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_tasks_v2_OAuthToken_descriptor,
+ new java.lang.String[] {
+ "ServiceAccountEmail", "Scope",
+ });
+ internal_static_google_cloud_tasks_v2_OidcToken_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_google_cloud_tasks_v2_OidcToken_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_tasks_v2_OidcToken_descriptor,
+ new java.lang.String[] {
+ "ServiceAccountEmail", "Audience",
+ });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
+ com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
+ descriptor, registry);
+ com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.AnnotationsProto.getDescriptor();
}
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
index 320237ce..cfa6a05b 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Task.java
@@ -90,6 +90,22 @@ private Task(
messageTypeCase_ = 2;
break;
}
+ case 26:
+ {
+ com.google.cloud.tasks.v2.HttpRequest.Builder subBuilder = null;
+ if (messageTypeCase_ == 3) {
+ subBuilder = ((com.google.cloud.tasks.v2.HttpRequest) messageType_).toBuilder();
+ }
+ messageType_ =
+ input.readMessage(
+ com.google.cloud.tasks.v2.HttpRequest.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((com.google.cloud.tasks.v2.HttpRequest) messageType_);
+ messageType_ = subBuilder.buildPartial();
+ }
+ messageTypeCase_ = 3;
+ break;
+ }
case 34:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
@@ -388,6 +404,7 @@ private View(int value) {
public enum MessageTypeCase implements com.google.protobuf.Internal.EnumLite {
APP_ENGINE_HTTP_REQUEST(2),
+ HTTP_REQUEST(3),
MESSAGETYPE_NOT_SET(0);
private final int value;
@@ -404,6 +421,8 @@ public static MessageTypeCase forNumber(int value) {
switch (value) {
case 2:
return APP_ENGINE_HTTP_REQUEST;
+ case 3:
+ return HTTP_REQUEST;
case 0:
return MESSAGETYPE_NOT_SET;
default:
@@ -543,6 +562,53 @@ public com.google.cloud.tasks.v2.AppEngineHttpRequest getAppEngineHttpRequest()
return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
}
+ public static final int HTTP_REQUEST_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public boolean hasHttpRequest() {
+ return messageTypeCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public com.google.cloud.tasks.v2.HttpRequest getHttpRequest() {
+ if (messageTypeCase_ == 3) {
+ return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
+ }
+ return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder() {
+ if (messageTypeCase_ == 3) {
+ return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
+ }
+ return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ }
+
public static final int SCHEDULE_TIME_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp scheduleTime_;
/**
@@ -644,6 +710,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -679,6 +747,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -716,6 +786,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -910,6 +982,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (messageTypeCase_ == 2) {
output.writeMessage(2, (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_);
}
+ if (messageTypeCase_ == 3) {
+ output.writeMessage(3, (com.google.cloud.tasks.v2.HttpRequest) messageType_);
+ }
if (scheduleTime_ != null) {
output.writeMessage(4, getScheduleTime());
}
@@ -951,6 +1026,11 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_);
}
+ if (messageTypeCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.cloud.tasks.v2.HttpRequest) messageType_);
+ }
if (scheduleTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getScheduleTime());
}
@@ -1019,6 +1099,9 @@ public boolean equals(final java.lang.Object obj) {
case 2:
if (!getAppEngineHttpRequest().equals(other.getAppEngineHttpRequest())) return false;
break;
+ case 3:
+ if (!getHttpRequest().equals(other.getHttpRequest())) return false;
+ break;
case 0:
default:
}
@@ -1066,6 +1149,10 @@ public int hashCode() {
hash = (37 * hash) + APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER;
hash = (53 * hash) + getAppEngineHttpRequest().hashCode();
break;
+ case 3:
+ hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER;
+ hash = (53 * hash) + getHttpRequest().hashCode();
+ break;
case 0:
default:
}
@@ -1286,6 +1373,13 @@ public com.google.cloud.tasks.v2.Task buildPartial() {
result.messageType_ = appEngineHttpRequestBuilder_.build();
}
}
+ if (messageTypeCase_ == 3) {
+ if (httpRequestBuilder_ == null) {
+ result.messageType_ = messageType_;
+ } else {
+ result.messageType_ = httpRequestBuilder_.build();
+ }
+ }
if (scheduleTimeBuilder_ == null) {
result.scheduleTime_ = scheduleTime_;
} else {
@@ -1398,6 +1492,11 @@ public Builder mergeFrom(com.google.cloud.tasks.v2.Task other) {
mergeAppEngineHttpRequest(other.getAppEngineHttpRequest());
break;
}
+ case HTTP_REQUEST:
+ {
+ mergeHttpRequest(other.getHttpRequest());
+ break;
+ }
case MESSAGETYPE_NOT_SET:
{
break;
@@ -1833,6 +1932,216 @@ public com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder getAppEngineHttpRe
return appEngineHttpRequestBuilder_;
}
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.HttpRequest,
+ com.google.cloud.tasks.v2.HttpRequest.Builder,
+ com.google.cloud.tasks.v2.HttpRequestOrBuilder>
+ httpRequestBuilder_;
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public boolean hasHttpRequest() {
+ return messageTypeCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public com.google.cloud.tasks.v2.HttpRequest getHttpRequest() {
+ if (httpRequestBuilder_ == null) {
+ if (messageTypeCase_ == 3) {
+ return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
+ }
+ return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ } else {
+ if (messageTypeCase_ == 3) {
+ return httpRequestBuilder_.getMessage();
+ }
+ return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public Builder setHttpRequest(com.google.cloud.tasks.v2.HttpRequest value) {
+ if (httpRequestBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ messageType_ = value;
+ onChanged();
+ } else {
+ httpRequestBuilder_.setMessage(value);
+ }
+ messageTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public Builder setHttpRequest(com.google.cloud.tasks.v2.HttpRequest.Builder builderForValue) {
+ if (httpRequestBuilder_ == null) {
+ messageType_ = builderForValue.build();
+ onChanged();
+ } else {
+ httpRequestBuilder_.setMessage(builderForValue.build());
+ }
+ messageTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public Builder mergeHttpRequest(com.google.cloud.tasks.v2.HttpRequest value) {
+ if (httpRequestBuilder_ == null) {
+ if (messageTypeCase_ == 3
+ && messageType_ != com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance()) {
+ messageType_ =
+ com.google.cloud.tasks.v2.HttpRequest.newBuilder(
+ (com.google.cloud.tasks.v2.HttpRequest) messageType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ messageType_ = value;
+ }
+ onChanged();
+ } else {
+ if (messageTypeCase_ == 3) {
+ httpRequestBuilder_.mergeFrom(value);
+ }
+ httpRequestBuilder_.setMessage(value);
+ }
+ messageTypeCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public Builder clearHttpRequest() {
+ if (httpRequestBuilder_ == null) {
+ if (messageTypeCase_ == 3) {
+ messageTypeCase_ = 0;
+ messageType_ = null;
+ onChanged();
+ }
+ } else {
+ if (messageTypeCase_ == 3) {
+ messageTypeCase_ = 0;
+ messageType_ = null;
+ }
+ httpRequestBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public com.google.cloud.tasks.v2.HttpRequest.Builder getHttpRequestBuilder() {
+ return getHttpRequestFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ public com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder() {
+ if ((messageTypeCase_ == 3) && (httpRequestBuilder_ != null)) {
+ return httpRequestBuilder_.getMessageOrBuilder();
+ } else {
+ if (messageTypeCase_ == 3) {
+ return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
+ }
+ return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.HttpRequest,
+ com.google.cloud.tasks.v2.HttpRequest.Builder,
+ com.google.cloud.tasks.v2.HttpRequestOrBuilder>
+ getHttpRequestFieldBuilder() {
+ if (httpRequestBuilder_ == null) {
+ if (!(messageTypeCase_ == 3)) {
+ messageType_ = com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
+ }
+ httpRequestBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.HttpRequest,
+ com.google.cloud.tasks.v2.HttpRequest.Builder,
+ com.google.cloud.tasks.v2.HttpRequestOrBuilder>(
+ (com.google.cloud.tasks.v2.HttpRequest) messageType_,
+ getParentForChildren(),
+ isClean());
+ messageType_ = null;
+ }
+ messageTypeCase_ = 3;
+ onChanged();
+ ;
+ return httpRequestBuilder_;
+ }
+
private com.google.protobuf.Timestamp scheduleTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
@@ -2230,6 +2539,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2265,6 +2576,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2306,6 +2619,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2351,6 +2666,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2393,6 +2710,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2442,6 +2761,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2485,6 +2806,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2522,6 +2845,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -2563,6 +2888,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
index 2268d7ca..8d823d7c 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskOrBuilder.java
@@ -110,6 +110,40 @@ public interface TaskOrBuilder
*/
com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder();
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ boolean hasHttpRequest();
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ com.google.cloud.tasks.v2.HttpRequest getHttpRequest();
+ /**
+ *
+ *
+ * + * HTTP request that is sent to the worker. + * An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + *+ * + *
.google.cloud.tasks.v2.HttpRequest http_request = 3;
+ */
+ com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder();
+
/**
*
*
@@ -191,6 +225,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -224,6 +260,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
@@ -257,6 +295,8 @@ 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.v2.HttpRequest], the default is 10 minutes. The deadline
+ * must be in the interval [15 seconds, 30 minutes].
* * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
* request has the default deadline. The default deadline depends on the
* [scaling
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskProto.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskProto.java
index bb651bff..a2f6539b 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskProto.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/TaskProto.java
@@ -50,30 +50,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\032\036google/protobuf/duration.proto\032\037google"
+ "/protobuf/timestamp.proto\032\027google/rpc/st"
+ "atus.proto\032\034google/api/annotations.proto"
- + "\"\370\004\n\004Task\022\014\n\004name\030\001 \001(\t\022N\n\027app_engine_ht"
+ + "\"\264\005\n\004Task\022\014\n\004name\030\001 \001(\t\022N\n\027app_engine_ht"
+ "tp_request\030\002 \001(\0132+.google.cloud.tasks.v2"
- + ".AppEngineHttpRequestH\000\0221\n\rschedule_time"
- + "\030\004 \001(\0132\032.google.protobuf.Timestamp\022/\n\013cr"
- + "eate_time\030\005 \001(\0132\032.google.protobuf.Timest"
- + "amp\0224\n\021dispatch_deadline\030\006 \001(\0132\031.google."
- + "protobuf.Duration\022\026\n\016dispatch_count\030\007 \001("
- + "\005\022\026\n\016response_count\030\010 \001(\005\0225\n\rfirst_attem"
- + "pt\030\t \001(\0132\036.google.cloud.tasks.v2.Attempt"
- + "\0224\n\014last_attempt\030\n \001(\0132\036.google.cloud.ta"
- + "sks.v2.Attempt\022.\n\004view\030\013 \001(\0162 .google.cl"
- + "oud.tasks.v2.Task.View\"1\n\004View\022\024\n\020VIEW_U"
- + "NSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002:h\352Ae\n\036"
- + "cloudtasks.googleapis.com/Task\022Cprojects"
- + "/{project}/locations/{location}/queues/{"
- + "queue}/tasks/{task}B\016\n\014message_type\"\317\001\n\007"
- + "Attempt\0221\n\rschedule_time\030\001 \001(\0132\032.google."
- + "protobuf.Timestamp\0221\n\rdispatch_time\030\002 \001("
- + "\0132\032.google.protobuf.Timestamp\0221\n\rrespons"
- + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp"
- + "\022+\n\017response_status\030\004 \001(\0132\022.google.rpc.S"
- + "tatusBd\n\031com.google.cloud.tasks.v2B\tTask"
- + "ProtoP\001Z:google.golang.org/genproto/goog"
- + "leapis/cloud/tasks/v2;tasksb\006proto3"
+ + ".AppEngineHttpRequestH\000\022:\n\014http_request\030"
+ + "\003 \001(\0132\".google.cloud.tasks.v2.HttpReques"
+ + "tH\000\0221\n\rschedule_time\030\004 \001(\0132\032.google.prot"
+ + "obuf.Timestamp\022/\n\013create_time\030\005 \001(\0132\032.go"
+ + "ogle.protobuf.Timestamp\0224\n\021dispatch_dead"
+ + "line\030\006 \001(\0132\031.google.protobuf.Duration\022\026\n"
+ + "\016dispatch_count\030\007 \001(\005\022\026\n\016response_count\030"
+ + "\010 \001(\005\0225\n\rfirst_attempt\030\t \001(\0132\036.google.cl"
+ + "oud.tasks.v2.Attempt\0224\n\014last_attempt\030\n \001"
+ + "(\0132\036.google.cloud.tasks.v2.Attempt\022.\n\004vi"
+ + "ew\030\013 \001(\0162 .google.cloud.tasks.v2.Task.Vi"
+ + "ew\"1\n\004View\022\024\n\020VIEW_UNSPECIFIED\020\000\022\t\n\005BASI"
+ + "C\020\001\022\010\n\004FULL\020\002:h\352Ae\n\036cloudtasks.googleapi"
+ + "s.com/Task\022Cprojects/{project}/locations"
+ + "/{location}/queues/{queue}/tasks/{task}B"
+ + "\016\n\014message_type\"\317\001\n\007Attempt\0221\n\rschedule_"
+ + "time\030\001 \001(\0132\032.google.protobuf.Timestamp\0221"
+ + "\n\rdispatch_time\030\002 \001(\0132\032.google.protobuf."
+ + "Timestamp\0221\n\rresponse_time\030\003 \001(\0132\032.googl"
+ + "e.protobuf.Timestamp\022+\n\017response_status\030"
+ + "\004 \001(\0132\022.google.rpc.StatusBd\n\031com.google."
+ + "cloud.tasks.v2B\tTaskProtoP\001Z:google.gola"
+ + "ng.org/genproto/googleapis/cloud/tasks/v"
+ + "2;tasksb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -102,6 +104,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors(
new java.lang.String[] {
"Name",
"AppEngineHttpRequest",
+ "HttpRequest",
"ScheduleTime",
"CreateTime",
"DispatchDeadline",
diff --git a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
index ce6a9024..b50f5aec 100644
--- a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
+++ b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
@@ -99,6 +99,7 @@ message Queue {
// [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
// These settings apply only to
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue.
+ // [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected.
//
// If set, `app_engine_routing_override` is used for all
// [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the
diff --git a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto
index acd38fed..04a88ce9 100644
--- a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto
+++ b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/target.proto
@@ -17,6 +17,7 @@ syntax = "proto3";
package google.cloud.tasks.v2;
+import "google/api/field_behavior.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks";
@@ -24,6 +25,112 @@ option java_multiple_files = true;
option java_outer_classname = "TargetProto";
option java_package = "com.google.cloud.tasks.v2";
+// HTTP request.
+//
+// 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][google.cloud.tasks.v2.Queue.retry_config],
+// [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2.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 backs off on all errors. Normally the backoff specified in
+// [rate limits][google.cloud.tasks.v2.Queue.rate_limits] 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 [(google.api.field_behavior) = REQUIRED];
+
+ // The HTTP method to use for the request. The default is POST.
+ HttpMethod http_method = 2;
+
+ // HTTP request headers.
+ //
+ // This map contains the header field names and values.
+ // Headers can be set when 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.v2.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