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.145.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.144.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.143.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.142.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.141.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.140.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.139.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.138.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.137.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.136.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.135.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.134.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.133.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.132.0 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.6 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.5 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.4 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.3 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.2 lib/aws-sdk-core/binary/encode_handler.rb
aws-sdk-core-3.131.1 lib/aws-sdk-core/binary/encode_handler.rb