Class: Google::Apis::DataflowV1b3::AutoscalingEvent

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 structured message reporting an autoscaling decision made by the Dataflow service.

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

Returns a new instance of AutoscalingEvent



747
748
749
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 747

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

Instance Attribute Details

#current_num_workersFixnum

The current number of workers the job has. Corresponds to the JSON property currentNumWorkers

Returns:

  • (Fixnum)


732
733
734
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 732

def current_num_workers
  @current_num_workers
end

#descriptionGoogle::Apis::DataflowV1b3::StructuredMessage

A rich message format, including a human readable string, a key for identifying the message, and structured data associated with the message for programmatic consumption. Corresponds to the JSON property description



739
740
741
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 739

def description
  @description
end

#event_typeString

The type of autoscaling event to report. Corresponds to the JSON property eventType

Returns:

  • (String)


727
728
729
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 727

def event_type
  @event_type
end

#target_num_workersFixnum

The target number of workers the worker pool wants to resize to use. Corresponds to the JSON property targetNumWorkers

Returns:

  • (Fixnum)


722
723
724
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 722

def target_num_workers
  @target_num_workers
end

#timeString

The time this event was emitted to indicate a new target or current num_workers value. Corresponds to the JSON property time

Returns:

  • (String)


745
746
747
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 745

def time
  @time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



752
753
754
755
756
757
758
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 752

def update!(**args)
  @target_num_workers = args[:target_num_workers] if args.key?(:target_num_workers)
  @event_type = args[:event_type] if args.key?(:event_type)
  @current_num_workers = args[:current_num_workers] if args.key?(:current_num_workers)
  @description = args[:description] if args.key?(:description)
  @time = args[:time] if args.key?(:time)
end