Class PullMessage.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PullMessage.Builder>
com.google.cloud.tasks.v2beta2.PullMessage.Builder
All Implemented Interfaces:
PullMessageOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PullMessage

public static final class PullMessage.Builder extends com.google.protobuf.GeneratedMessage.Builder<PullMessage.Builder> implements PullMessageOrBuilder
 The pull message contains data that can be used by the caller of
 [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the
 task.

 This proto can only be used for tasks in a queue which has
 [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
 
Protobuf type google.cloud.tasks.v2beta2.PullMessage
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    A data payload consumed by the worker to execute the task.
    The task's tag.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.ByteString
    A data payload consumed by the worker to execute the task.
    The task's tag.
    com.google.protobuf.ByteString
    The task's tag.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setPayload(com.google.protobuf.ByteString value)
    A data payload consumed by the worker to execute the task.
    setTag(String value)
    The task's tag.
    setTagBytes(com.google.protobuf.ByteString value)
    The task's tag.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

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

      public PullMessage.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.GeneratedMessage.Builder<PullMessage.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.GeneratedMessage.Builder<PullMessage.Builder>
    • getDefaultInstanceForType

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

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

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

      public PullMessage.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<PullMessage.Builder>
    • mergeFrom

      public PullMessage.Builder mergeFrom(PullMessage other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PullMessage.Builder>
    • mergeFrom

      public PullMessage.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<PullMessage.Builder>
      Throws:
      IOException
    • getPayload

      public com.google.protobuf.ByteString getPayload()
       A data payload consumed by the worker to execute the task.
       
      bytes payload = 1;
      Specified by:
      getPayload in interface PullMessageOrBuilder
      Returns:
      The payload.
    • setPayload

      public PullMessage.Builder setPayload(com.google.protobuf.ByteString value)
       A data payload consumed by the worker to execute the task.
       
      bytes payload = 1;
      Parameters:
      value - The payload to set.
      Returns:
      This builder for chaining.
    • clearPayload

      public PullMessage.Builder clearPayload()
       A data payload consumed by the worker to execute the task.
       
      bytes payload = 1;
      Returns:
      This builder for chaining.
    • getTag

      public String getTag()
       The task's tag.
      
       Tags allow similar tasks to be processed in a batch. If you label
       tasks with a tag, your worker can
       [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
       same tag using
       [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
       if you want to aggregate the events associated with a specific user once a
       day, you could tag tasks with the user ID.
      
       The task's tag can only be set when the
       [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
      
       The tag must be less than 500 characters.
      
       SDK compatibility: Although the SDK allows tags to be either
       string or
       [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
       only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
       encoded, the tag will be empty when the task is returned by Cloud Tasks.
       
      string tag = 2;
      Specified by:
      getTag in interface PullMessageOrBuilder
      Returns:
      The tag.
    • getTagBytes

      public com.google.protobuf.ByteString getTagBytes()
       The task's tag.
      
       Tags allow similar tasks to be processed in a batch. If you label
       tasks with a tag, your worker can
       [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
       same tag using
       [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
       if you want to aggregate the events associated with a specific user once a
       day, you could tag tasks with the user ID.
      
       The task's tag can only be set when the
       [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
      
       The tag must be less than 500 characters.
      
       SDK compatibility: Although the SDK allows tags to be either
       string or
       [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
       only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
       encoded, the tag will be empty when the task is returned by Cloud Tasks.
       
      string tag = 2;
      Specified by:
      getTagBytes in interface PullMessageOrBuilder
      Returns:
      The bytes for tag.
    • setTag

      public PullMessage.Builder setTag(String value)
       The task's tag.
      
       Tags allow similar tasks to be processed in a batch. If you label
       tasks with a tag, your worker can
       [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
       same tag using
       [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
       if you want to aggregate the events associated with a specific user once a
       day, you could tag tasks with the user ID.
      
       The task's tag can only be set when the
       [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
      
       The tag must be less than 500 characters.
      
       SDK compatibility: Although the SDK allows tags to be either
       string or
       [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
       only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
       encoded, the tag will be empty when the task is returned by Cloud Tasks.
       
      string tag = 2;
      Parameters:
      value - The tag to set.
      Returns:
      This builder for chaining.
    • clearTag

      public PullMessage.Builder clearTag()
       The task's tag.
      
       Tags allow similar tasks to be processed in a batch. If you label
       tasks with a tag, your worker can
       [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
       same tag using
       [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
       if you want to aggregate the events associated with a specific user once a
       day, you could tag tasks with the user ID.
      
       The task's tag can only be set when the
       [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
      
       The tag must be less than 500 characters.
      
       SDK compatibility: Although the SDK allows tags to be either
       string or
       [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
       only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
       encoded, the tag will be empty when the task is returned by Cloud Tasks.
       
      string tag = 2;
      Returns:
      This builder for chaining.
    • setTagBytes

      public PullMessage.Builder setTagBytes(com.google.protobuf.ByteString value)
       The task's tag.
      
       Tags allow similar tasks to be processed in a batch. If you label
       tasks with a tag, your worker can
       [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the
       same tag using
       [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example,
       if you want to aggregate the events associated with a specific user once a
       day, you could tag tasks with the user ID.
      
       The task's tag can only be set when the
       [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
      
       The tag must be less than 500 characters.
      
       SDK compatibility: Although the SDK allows tags to be either
       string or
       [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
       only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
       encoded, the tag will be empty when the task is returned by Cloud Tasks.
       
      string tag = 2;
      Parameters:
      value - The bytes for tag to set.
      Returns:
      This builder for chaining.