Class: Google::Apis::CloudtasksV2beta2::RenewLeaseRequest

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudtasks_v2beta2/classes.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb

Overview

Request message for renewing a lease using CloudTasks.RenewLease.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ RenewLeaseRequest

Returns a new instance of RenewLeaseRequest



1238
1239
1240
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1238

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#new_lease_durationString

Required. The desired new lease duration, starting from now. The maximum lease duration is 1 week. new_lease_duration will be truncated to the nearest second. Corresponds to the JSON property newLeaseDuration

Returns:

  • (String)


1213
1214
1215
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1213

def new_lease_duration
  @new_lease_duration
end

#response_viewString

The response_view specifies which subset of the Task will be returned. By default response_view is Task.View.BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for Task.View.FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task.name resource. Corresponds to the JSON property responseView

Returns:

  • (String)


1227
1228
1229
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1227

def response_view
  @response_view
end

#schedule_timeString

Required. The task's current schedule time, available in the Task.schedule_time returned in PullTasksResponse.tasks or CloudTasks.RenewLease. This restriction is to check that the caller is renewing the correct task. Corresponds to the JSON property scheduleTime

Returns:

  • (String)


1236
1237
1238
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1236

def schedule_time
  @schedule_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1243
1244
1245
1246
1247
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1243

def update!(**args)
  @new_lease_duration = args[:new_lease_duration] if args.key?(:new_lease_duration)
  @response_view = args[:response_view] if args.key?(:response_view)
  @schedule_time = args[:schedule_time] if args.key?(:schedule_time)
end