Class: Temporal::Client::Serializer::RequestActivityCancellation

Inherits:
Base
  • Object
show all
Defined in:
lib/temporal/client/serializer/request_activity_cancellation.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
# File 'lib/temporal/client/serializer/request_activity_cancellation.rb', line 7

def to_proto
  Temporal::Api::Command::V1::Command.new(
    command_type: Temporal::Api::Enums::V1::CommandType::COMMAND_TYPE_REQUEST_CANCEL_ACTIVITY_TASK,
    request_cancel_activity_task_command_attributes:
      Temporal::Api::Command::V1::RequestCancelActivityTaskCommandAttributes.new(
        scheduled_event_id: object.activity_id.to_i
      )
  )
end