Class: Google::Apis::TaskqueueV1beta1::Task
- Inherits:
-
Object
- Object
- Google::Apis::TaskqueueV1beta1::Task
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/taskqueue_v1beta1/classes.rb,
generated/google/apis/taskqueue_v1beta1/representations.rb,
generated/google/apis/taskqueue_v1beta1/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.
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
61 62 63 |
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 61 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_v1beta1/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_v1beta1/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_v1beta1/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_v1beta1/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_v1beta1/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_v1beta1/classes.rb', line 59 def queue_name @queue_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
66 67 68 69 70 71 72 73 |
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 66 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) end |