Class: Temporal::Client::Serializer::StartTimer

Inherits:
Base
  • Object
show all
Defined in:
lib/temporal/client/serializer/start_timer.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Temporal::Client::Serializer::Base

Instance Method Details

#to_protoObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/temporal/client/serializer/start_timer.rb', line 7

def to_proto
  Temporal::Api::Command::V1::Command.new(
    command_type: Temporal::Api::Enums::V1::CommandType::COMMAND_TYPE_START_TIMER,
    start_timer_command_attributes:
      Temporal::Api::Command::V1::StartTimerCommandAttributes.new(
        timer_id: object.timer_id.to_s,
        start_to_fire_timeout: object.timeout
      )
  )
end