Class: Google::Apis::DataflowV1b3::ApproximateSplitRequest

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

Overview

A suggestion by the service to the worker to dynamically split the WorkItem.

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) ⇒ ApproximateSplitRequest

Returns a new instance of ApproximateSplitRequest



117
118
119
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 117

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

Instance Attribute Details

#fraction_consumedFloat

A fraction at which to split the work item, from 0.0 (beginning of the input) to 1.0 (end of the input). Corresponds to the JSON property fractionConsumed

Returns:

  • (Float)


108
109
110
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 108

def fraction_consumed
  @fraction_consumed
end

#positionGoogle::Apis::DataflowV1b3::Position

Position defines a position within a collection of data. The value can be either the end position, a key (used with ordered collections), a byte offset, or a record index. Corresponds to the JSON property position



115
116
117
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 115

def position
  @position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



122
123
124
125
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 122

def update!(**args)
  @fraction_consumed = args[:fraction_consumed] if args.key?(:fraction_consumed)
  @position = args[:position] if args.key?(:position)
end