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.123.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.122.1 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.122.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.6 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.5 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.3 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.2 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.1 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.121.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.120.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.119.1 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.119.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.118.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.117.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.116.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.115.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.114.3 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.114.2 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.114.1 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.114.0 lib/aws-sdk-core/binary/encode_handler.rb