Class: Google::Apis::TaskqueueV1beta2::Task
- Inherits:
-
Object
- Object
- Google::Apis::TaskqueueV1beta2::Task
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/taskqueue_v1beta2/classes.rb,
generated/google/apis/taskqueue_v1beta2/representations.rb,
generated/google/apis/taskqueue_v1beta2/representations.rb
Instance Attribute Summary collapse
-
#enqueue_timestamp ⇒ Fixnum
Time (in seconds since the epoch) at which the task was enqueued.
-
#id ⇒ String
Name of the task.
-
#kind ⇒ String
The kind of object returned, in this case set to task.
-
#lease_timestamp ⇒ Fixnum
Time (in seconds since the epoch) at which the task lease will expire.
-
#payload_base64 ⇒ String
A bag of bytes which is the task payload.
-
#queue_name ⇒ String
Name of the queue that the task is in.
-
#retry_count ⇒ Fixnum
The number of leases applied to this task.
-
#tag ⇒ String
Tag for the task, could be used later to lease tasks grouped by a specific tag.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Task
constructor
A new instance of Task.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Task
Returns a new instance of Task
71 72 73 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 71 def initialize(**args) update!(**args) end |
Instance Attribute Details
#enqueue_timestamp ⇒ Fixnum
Time (in seconds since the epoch) at which the task was enqueued.
Corresponds to the JSON property enqueueTimestamp
32 33 34 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 32 def @enqueue_timestamp end |
#id ⇒ String
Name of the task.
Corresponds to the JSON property id
37 38 39 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 37 def id @id end |
#kind ⇒ String
The kind of object returned, in this case set to task.
Corresponds to the JSON property kind
42 43 44 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 42 def kind @kind end |
#lease_timestamp ⇒ Fixnum
Time (in seconds since the epoch) at which the task lease will expire. This
value is 0 if the task isnt currently leased out to a worker.
Corresponds to the JSON property leaseTimestamp
48 49 50 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 48 def @lease_timestamp end |
#payload_base64 ⇒ String
A bag of bytes which is the task payload. The payload on the JSON side is
always Base64 encoded.
Corresponds to the JSON property payloadBase64
54 55 56 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 54 def payload_base64 @payload_base64 end |
#queue_name ⇒ String
Name of the queue that the task is in.
Corresponds to the JSON property queueName
59 60 61 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 59 def queue_name @queue_name end |
#retry_count ⇒ Fixnum
The number of leases applied to this task.
Corresponds to the JSON property retry_count
64 65 66 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 64 def retry_count @retry_count end |
#tag ⇒ String
Tag for the task, could be used later to lease tasks grouped by a specific tag.
Corresponds to the JSON property tag
69 70 71 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 69 def tag @tag end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
76 77 78 79 80 81 82 83 84 85 |
# File 'generated/google/apis/taskqueue_v1beta2/classes.rb', line 76 def update!(**args) @enqueue_timestamp = args[:enqueue_timestamp] if args.key?(:enqueue_timestamp) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @lease_timestamp = args[:lease_timestamp] if args.key?(:lease_timestamp) @payload_base64 = args[:payload_base64] if args.key?(:payload_base64) @queue_name = args[:queue_name] if args.key?(:queue_name) @retry_count = args[:retry_count] if args.key?(:retry_count) @tag = args[:tag] if args.key?(:tag) end |