Class: Google::Apis::DataflowV1b3::LeaseWorkItemRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dataflow_v1b3/classes.rb,
lib/google/apis/dataflow_v1b3/representations.rb,
lib/google/apis/dataflow_v1b3/representations.rb

Overview

Request to lease WorkItems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LeaseWorkItemRequest

Returns a new instance of LeaseWorkItemRequest.



3033
3034
3035
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3033

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

Instance Attribute Details

#current_worker_timeString

The current timestamp at the worker. Corresponds to the JSON property currentWorkerTime

Returns:

  • (String)


2993
2994
2995
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2993

def current_worker_time
  @current_worker_time
end

#locationString

The regional endpoint that contains the WorkItem's job. Corresponds to the JSON property location

Returns:

  • (String)


2999
3000
3001
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 2999

def location
  @location
end

#project_numberFixnum

Optional. The project number of the project this worker belongs to. Corresponds to the JSON property projectNumber

Returns:

  • (Fixnum)


3004
3005
3006
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3004

def project_number
  @project_number
end

#requested_lease_durationString

The initial lease period. Corresponds to the JSON property requestedLeaseDuration

Returns:

  • (String)


3009
3010
3011
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3009

def requested_lease_duration
  @requested_lease_duration
end

#unified_worker_requestHash<String,Object>

Untranslated bag-of-bytes WorkRequest from UnifiedWorker. Corresponds to the JSON property unifiedWorkerRequest

Returns:

  • (Hash<String,Object>)


3014
3015
3016
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3014

def unified_worker_request
  @unified_worker_request
end

#work_item_typesArray<String>

Filter for WorkItem type. Corresponds to the JSON property workItemTypes

Returns:

  • (Array<String>)


3019
3020
3021
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3019

def work_item_types
  @work_item_types
end

#worker_capabilitiesArray<String>

Worker capabilities. WorkItems might be limited to workers with specific capabilities. Corresponds to the JSON property workerCapabilities

Returns:

  • (Array<String>)


3025
3026
3027
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3025

def worker_capabilities
  @worker_capabilities
end

#worker_idString

Identifies the worker leasing work -- typically the ID of the virtual machine running the worker. Corresponds to the JSON property workerId

Returns:

  • (String)


3031
3032
3033
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3031

def worker_id
  @worker_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 3038

def update!(**args)
  @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time)
  @location = args[:location] if args.key?(:location)
  @project_number = args[:project_number] if args.key?(:project_number)
  @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration)
  @unified_worker_request = args[:unified_worker_request] if args.key?(:unified_worker_request)
  @work_item_types = args[:work_item_types] if args.key?(:work_item_types)
  @worker_capabilities = args[:worker_capabilities] if args.key?(:worker_capabilities)
  @worker_id = args[:worker_id] if args.key?(:worker_id)
end