Class: Google::Apis::TaskqueueV1beta1::Task

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

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_timestampFixnum

Time (in seconds since the epoch) at which the task was enqueued. Corresponds to the JSON property enqueueTimestamp

Returns:

  • (Fixnum)


32
33
34
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 32

def enqueue_timestamp
  @enqueue_timestamp
end

#idString

Name of the task. Corresponds to the JSON property id

Returns:

  • (String)


37
38
39
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 37

def id
  @id
end

#kindString

The kind of object returned, in this case set to task. Corresponds to the JSON property kind

Returns:

  • (String)


42
43
44
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 42

def kind
  @kind
end

#lease_timestampFixnum

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

Returns:

  • (Fixnum)


48
49
50
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 48

def lease_timestamp
  @lease_timestamp
end

#payload_base64String

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

Returns:

  • (String)


54
55
56
# File 'generated/google/apis/taskqueue_v1beta1/classes.rb', line 54

def payload_base64
  @payload_base64
end

#queue_nameString

Name of the queue that the task is in. Corresponds to the JSON property queueName

Returns:

  • (String)


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