Class 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 type google.cloud.tasks.v2beta2.HttpRequest
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • clear

        public HttpRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • getDefaultInstanceForType

        public HttpRequest getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public HttpRequest build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public HttpRequest buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public HttpRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • setField

        public HttpRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • clearField

        public HttpRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • clearOneof

        public HttpRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • addRepeatedField

        public HttpRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • mergeFrom

        public HttpRequest.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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 interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRequest.Builder>
        Throws:
        IOException
      • 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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
      • 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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
        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 interface HttpRequestOrBuilder
      • setUnknownFields

        public final HttpRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>
      • mergeUnknownFields

        public final HttpRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<HttpRequest.Builder>