Reference documentation and code samples for the Cloud Tasks V2beta2 API class Google::Cloud::Tasks::V2beta2::PullMessage.
The pull message contains data that can be used by the caller of
LeaseTasks to process the
task.
This proto can only be used for tasks in a queue which has
pull_target set.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#payload
defpayload()->::String
Returns
(::String) — A data payload consumed by the worker to execute the task.
#payload=
defpayload=(value)->::String
Parameter
value (::String) — A data payload consumed by the worker to execute the task.
Returns
(::String) — A data payload consumed by the worker to execute the task.
#tag
deftag()->::String
Returns
(::String) — 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 with the
same tag using
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.
SDK compatibility: Although the SDK allows tags to be either
string or
bytes,
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.
#tag=
deftag=(value)->::String
Parameter
value (::String) — 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 with the
same tag using
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.
SDK compatibility: Although the SDK allows tags to be either
string or
bytes,
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.
Returns
(::String) — 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 with the
same tag using
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.
SDK compatibility: Although the SDK allows tags to be either
string or
bytes,
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Tasks V2beta2 API - Class Google::Cloud::Tasks::V2beta2::PullMessage (v0.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.15.0 (latest)](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.14.1](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.14.1/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.13.0](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.13.0/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.12.1](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.12.1/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.11.3](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.11.3/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.10.0](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.10.0/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.9.2](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.9.2/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.8.0](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.8.0/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.7.0](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.7.0/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.6.0](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.6.0/Google-Cloud-Tasks-V2beta2-PullMessage)\n- [0.5.5](/ruby/docs/reference/google-cloud-tasks-v2beta2/0.5.5/Google-Cloud-Tasks-V2beta2-PullMessage) \nReference documentation and code samples for the Cloud Tasks V2beta2 API class Google::Cloud::Tasks::V2beta2::PullMessage.\n\nThe pull message contains data that can be used by the caller of\n[LeaseTasks](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)\") to process the\ntask.\n\n\n\u003cbr /\u003e\n\nThis proto can only be used for tasks in a queue which has\n[pull_target](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-Queue#Google__Cloud__Tasks__V2beta2__Queue_pull_target_instance_ \"Google::Cloud::Tasks::V2beta2::Queue#pull_target (method)\") set. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #payload\n\n def payload() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A data payload consumed by the worker to execute the task.\n\n### #payload=\n\n def payload=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A data payload consumed by the worker to execute the task. \n**Returns**\n\n- (::String) --- A data payload consumed by the worker to execute the task.\n\n### #tag\n\n def tag() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The task's tag.\n\n Tags allow similar tasks to be processed in a batch. If you label\n tasks with a tag, your worker can\n [lease tasks](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)\") with the\n same tag using\n [filter](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-LeaseTasksRequest#Google__Cloud__Tasks__V2beta2__LeaseTasksRequest_filter_instance_ \"Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter (method)\"). For example,\n if you want to aggregate the events associated with a specific user once a\n day, you could tag tasks with the user ID.\n\n The task's tag can only be set when the\n [task is created](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_create_task_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task (method)\").\n\n The tag must be less than 500 characters.\n\n SDK compatibility: Although the SDK allows tags to be either\n string or\n [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),\n only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8\n encoded, the tag will be empty when the task is returned by Cloud Tasks.\n\n### #tag=\n\n def tag=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The task's tag.\n\n\n Tags allow similar tasks to be processed in a batch. If you label\n tasks with a tag, your worker can\n [lease tasks](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)\") with the\n same tag using\n [filter](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-LeaseTasksRequest#Google__Cloud__Tasks__V2beta2__LeaseTasksRequest_filter_instance_ \"Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter (method)\"). For example,\n if you want to aggregate the events associated with a specific user once a\n day, you could tag tasks with the user ID.\n\n The task's tag can only be set when the\n [task is created](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_create_task_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task (method)\").\n\n The tag must be less than 500 characters.\n\n SDK compatibility: Although the SDK allows tags to be either\n string or\n [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),\n only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8\nencoded, the tag will be empty when the task is returned by Cloud Tasks. \n**Returns**\n\n- (::String) --- The task's tag.\n\n Tags allow similar tasks to be processed in a batch. If you label\n tasks with a tag, your worker can\n [lease tasks](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_lease_tasks_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks (method)\") with the\n same tag using\n [filter](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-LeaseTasksRequest#Google__Cloud__Tasks__V2beta2__LeaseTasksRequest_filter_instance_ \"Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter (method)\"). For example,\n if you want to aggregate the events associated with a specific user once a\n day, you could tag tasks with the user ID.\n\n The task's tag can only be set when the\n [task is created](/ruby/docs/reference/google-cloud-tasks-v2beta2/latest/Google-Cloud-Tasks-V2beta2-CloudTasks-Client#Google__Cloud__Tasks__V2beta2__CloudTasks__Client_create_task_instance_ \"Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task (method)\").\n\n The tag must be less than 500 characters.\n\n SDK compatibility: Although the SDK allows tags to be either\n string or\n [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),\n only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8\n encoded, the tag will be empty when the task is returned by Cloud Tasks."]]