Sha256: d1cc25c264d97860c23da6aaa16936cee4ffb3ebcc07f99bb977c08367dc3ca7

Contents?: true

Size: 847 Bytes

Versions: 104

Compression:

Stored size: 847 Bytes

Contents

# frozen_string_literal: true

module Aws
  module Binary

    # @api private
    class EncodeHandler < Seahorse::Client::Handler

      def call(context)
        if eventstream_member = eventstream_input?(context)
          input_es_handler = context[:input_event_stream_handler]
          input_es_handler.event_emitter.encoder = EventStreamEncoder.new(
            context.config.api.metadata['protocol'],
            eventstream_member,
            context.operation.input,
            context.config.sigv4_signer
          )
          context[:input_event_emitter] = input_es_handler.event_emitter
        end
        @handler.call(context)
      end

      private

      def eventstream_input?(ctx)
        ctx.operation.input.shape.members.each do |_, ref|
          return ref if ref.eventstream
        end
      end

    end

  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
aws-sdk-core-3.164.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.163.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.162.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.161.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.160.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.159.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.158.1 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.158.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.157.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.156.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.155.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.154.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.153.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.152.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.151.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.150.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.149.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.148.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.147.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.146.0 lib/aws-sdk-core/binary/encode_handler.rb