Package com.google.cloud.tasks.v2beta2
Class HttpRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
- com.google.cloud.tasks.v2beta2.HttpRequest.Builder
-
- All Implemented Interfaces:
HttpRequestOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- HttpRequest
public static final class HttpRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder> implements HttpRequestOrBuilder
HTTP request. The task will be pushed to the worker as an HTTP request. An HTTP request embodies a url, an http method, headers, body and authorization for the http task.
Protobuf typegoogle.cloud.tasks.v2beta2.HttpRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HttpRequest.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
HttpRequest
build()
HttpRequest
buildPartial()
HttpRequest.Builder
clear()
HttpRequest.Builder
clearAuthorizationHeader()
HttpRequest.Builder
clearBody()
HTTP request body.HttpRequest.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
HttpRequest.Builder
clearHeaders()
HttpRequest.Builder
clearHttpMethod()
The HTTP method to use for the request.HttpRequest.Builder
clearOauthToken()
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.HttpRequest.Builder
clearOidcToken()
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.HttpRequest.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
HttpRequest.Builder
clearUrl()
Required.HttpRequest.Builder
clone()
boolean
containsHeaders(String key)
HTTP request headers.HttpRequest.AuthorizationHeaderCase
getAuthorizationHeaderCase()
com.google.protobuf.ByteString
getBody()
HTTP request body.HttpRequest
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Map<String,String>
getHeaders()
Deprecated.int
getHeadersCount()
HTTP request headers.Map<String,String>
getHeadersMap()
HTTP request headers.String
getHeadersOrDefault(String key, String defaultValue)
HTTP request headers.String
getHeadersOrThrow(String key)
HTTP request headers.HttpMethod
getHttpMethod()
The HTTP method to use for the request.int
getHttpMethodValue()
The HTTP method to use for the request.Map<String,String>
getMutableHeaders()
Deprecated.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.OAuthToken.Builder
getOauthTokenBuilder()
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.OAuthTokenOrBuilder
getOauthTokenOrBuilder()
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.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.OidcToken.Builder
getOidcTokenBuilder()
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.OidcTokenOrBuilder
getOidcTokenOrBuilder()
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.String
getUrl()
Required.com.google.protobuf.ByteString
getUrlBytes()
Required.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.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
HttpRequest.Builder
mergeFrom(HttpRequest other)
HttpRequest.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
HttpRequest.Builder
mergeFrom(com.google.protobuf.Message other)
HttpRequest.Builder
mergeOauthToken(OAuthToken value)
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.HttpRequest.Builder
mergeOidcToken(OidcToken value)
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.HttpRequest.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
HttpRequest.Builder
putAllHeaders(Map<String,String> values)
HTTP request headers.HttpRequest.Builder
putHeaders(String key, String value)
HTTP request headers.HttpRequest.Builder
removeHeaders(String key)
HTTP request headers.HttpRequest.Builder
setBody(com.google.protobuf.ByteString value)
HTTP request body.HttpRequest.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
HttpRequest.Builder
setHttpMethod(HttpMethod value)
The HTTP method to use for the request.HttpRequest.Builder
setHttpMethodValue(int value)
The HTTP method to use for the request.HttpRequest.Builder
setOauthToken(OAuthToken value)
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.HttpRequest.Builder
setOauthToken(OAuthToken.Builder builderForValue)
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.HttpRequest.Builder
setOidcToken(OidcToken value)
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.HttpRequest.Builder
setOidcToken(OidcToken.Builder builderForValue)
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.HttpRequest.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
HttpRequest.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
HttpRequest.Builder
setUrl(String value)
Required.HttpRequest.Builder
setUrlBytes(com.google.protobuf.ByteString value)
Required.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
clear
public HttpRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
getDefaultInstanceForType
public HttpRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public HttpRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public HttpRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public HttpRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
setField
public HttpRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
clearField
public HttpRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
clearOneof
public HttpRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
setRepeatedField
public HttpRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
addRepeatedField
public HttpRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
mergeFrom
public HttpRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<HttpRequest.Builder>
-
mergeFrom
public HttpRequest.Builder mergeFrom(HttpRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
mergeFrom
public HttpRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<HttpRequest.Builder>
- Throws:
IOException
-
getAuthorizationHeaderCase
public HttpRequest.AuthorizationHeaderCase getAuthorizationHeaderCase()
- Specified by:
getAuthorizationHeaderCase
in interfaceHttpRequestOrBuilder
-
clearAuthorizationHeader
public HttpRequest.Builder clearAuthorizationHeader()
-
getUrl
public 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];
- Specified by:
getUrl
in interfaceHttpRequestOrBuilder
- Returns:
- The url.
-
getUrlBytes
public com.google.protobuf.ByteString getUrlBytes()
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];
- Specified by:
getUrlBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for url.
-
setUrl
public HttpRequest.Builder setUrl(String value)
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];
- Parameters:
value
- The url to set.- Returns:
- This builder for chaining.
-
clearUrl
public HttpRequest.Builder clearUrl()
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];
- Returns:
- This builder for chaining.
-
setUrlBytes
public HttpRequest.Builder setUrlBytes(com.google.protobuf.ByteString value)
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];
- Parameters:
value
- The bytes for url to set.- Returns:
- This builder for chaining.
-
getHttpMethodValue
public int getHttpMethodValue()
The HTTP method to use for the request. The default is POST.
.google.cloud.tasks.v2beta2.HttpMethod http_method = 2;
- Specified by:
getHttpMethodValue
in interfaceHttpRequestOrBuilder
- Returns:
- The enum numeric value on the wire for httpMethod.
-
setHttpMethodValue
public HttpRequest.Builder setHttpMethodValue(int value)
The HTTP method to use for the request. The default is POST.
.google.cloud.tasks.v2beta2.HttpMethod http_method = 2;
- Parameters:
value
- The enum numeric value on the wire for httpMethod to set.- Returns:
- This builder for chaining.
-
getHttpMethod
public HttpMethod getHttpMethod()
The HTTP method to use for the request. The default is POST.
.google.cloud.tasks.v2beta2.HttpMethod http_method = 2;
- Specified by:
getHttpMethod
in interfaceHttpRequestOrBuilder
- Returns:
- The httpMethod.
-
setHttpMethod
public HttpRequest.Builder setHttpMethod(HttpMethod value)
The HTTP method to use for the request. The default is POST.
.google.cloud.tasks.v2beta2.HttpMethod http_method = 2;
- Parameters:
value
- The httpMethod to set.- Returns:
- This builder for chaining.
-
clearHttpMethod
public HttpRequest.Builder clearHttpMethod()
The HTTP method to use for the request. The default is POST.
.google.cloud.tasks.v2beta2.HttpMethod http_method = 2;
- Returns:
- This builder for chaining.
-
getHeadersCount
public int getHeadersCount()
Description copied from interface:HttpRequestOrBuilder
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
- Specified by:
getHeadersCount
in interfaceHttpRequestOrBuilder
-
containsHeaders
public boolean containsHeaders(String key)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
- Specified by:
containsHeaders
in interfaceHttpRequestOrBuilder
-
getHeaders
@Deprecated public Map<String,String> getHeaders()
Deprecated.UsegetHeadersMap()
instead.- Specified by:
getHeaders
in interfaceHttpRequestOrBuilder
-
getHeadersMap
public Map<String,String> getHeadersMap()
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
- Specified by:
getHeadersMap
in interfaceHttpRequestOrBuilder
-
getHeadersOrDefault
public String getHeadersOrDefault(String key, String defaultValue)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
- Specified by:
getHeadersOrDefault
in interfaceHttpRequestOrBuilder
-
getHeadersOrThrow
public String getHeadersOrThrow(String key)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
- Specified by:
getHeadersOrThrow
in interfaceHttpRequestOrBuilder
-
clearHeaders
public HttpRequest.Builder clearHeaders()
-
removeHeaders
public HttpRequest.Builder removeHeaders(String key)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
-
getMutableHeaders
@Deprecated public Map<String,String> getMutableHeaders()
Deprecated.Use alternate mutation accessors instead.
-
putHeaders
public HttpRequest.Builder putHeaders(String key, String value)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
-
putAllHeaders
public HttpRequest.Builder putAllHeaders(Map<String,String> values)
HTTP request headers. This map contains the header field names and values. Headers can be set when running the [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
map<string, string> headers = 3;
-
getBody
public com.google.protobuf.ByteString getBody()
HTTP request body. A request body is allowed only if the [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
bytes body = 4;
- Specified by:
getBody
in interfaceHttpRequestOrBuilder
- Returns:
- The body.
-
setBody
public HttpRequest.Builder setBody(com.google.protobuf.ByteString value)
HTTP request body. A request body is allowed only if the [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
bytes body = 4;
- Parameters:
value
- The body to set.- Returns:
- This builder for chaining.
-
clearBody
public HttpRequest.Builder clearBody()
HTTP request body. A request body is allowed only if the [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
bytes body = 4;
- Returns:
- This builder for chaining.
-
hasOauthToken
public boolean hasOauthToken()
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
- Specified by:
hasOauthToken
in interfaceHttpRequestOrBuilder
- Returns:
- Whether the oauthToken field is set.
-
getOauthToken
public OAuthToken getOauthToken()
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
- Specified by:
getOauthToken
in interfaceHttpRequestOrBuilder
- Returns:
- The oauthToken.
-
setOauthToken
public HttpRequest.Builder setOauthToken(OAuthToken value)
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
-
setOauthToken
public HttpRequest.Builder setOauthToken(OAuthToken.Builder builderForValue)
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
-
mergeOauthToken
public HttpRequest.Builder mergeOauthToken(OAuthToken value)
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
-
clearOauthToken
public HttpRequest.Builder clearOauthToken()
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
-
getOauthTokenBuilder
public OAuthToken.Builder getOauthTokenBuilder()
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
-
getOauthTokenOrBuilder
public OAuthTokenOrBuilder getOauthTokenOrBuilder()
If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
.google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5;
- Specified by:
getOauthTokenOrBuilder
in interfaceHttpRequestOrBuilder
-
hasOidcToken
public boolean hasOidcToken()
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
- Specified by:
hasOidcToken
in interfaceHttpRequestOrBuilder
- Returns:
- Whether the oidcToken field is set.
-
getOidcToken
public OidcToken getOidcToken()
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
- Specified by:
getOidcToken
in interfaceHttpRequestOrBuilder
- Returns:
- The oidcToken.
-
setOidcToken
public HttpRequest.Builder setOidcToken(OidcToken value)
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
-
setOidcToken
public HttpRequest.Builder setOidcToken(OidcToken.Builder builderForValue)
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
-
mergeOidcToken
public HttpRequest.Builder mergeOidcToken(OidcToken value)
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
-
clearOidcToken
public HttpRequest.Builder clearOidcToken()
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
-
getOidcTokenBuilder
public OidcToken.Builder getOidcTokenBuilder()
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
-
getOidcTokenOrBuilder
public OidcTokenOrBuilder getOidcTokenOrBuilder()
If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
.google.cloud.tasks.v2beta2.OidcToken oidc_token = 6;
- Specified by:
getOidcTokenOrBuilder
in interfaceHttpRequestOrBuilder
-
setUnknownFields
public final HttpRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
mergeUnknownFields
public final HttpRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
-
-