Sha256: c3bf310861ba1e008546e4fe71f4843753bea9284168491aa4b5e2ef8220f4d9

Contents?: true

Size: 1.63 KB

Versions: 40

Compression:

Stored size: 1.63 KB

Contents

module Seahorse
  module Client
    # RBS does not support Delegator.
    # the behavior is mimicked `Seahorse::Client::Response` as much as possible.
    interface _ResponseCommon
      def context: () -> untyped

      def checksum_validated: () -> ::String?

      def on: (Integer) { (self) -> void } -> self
            | (Range[Integer]) { (self) -> void } -> self

      def on_success: () { (self) -> void } -> self

      def successful?: () -> bool
    end

    # The interface for response success
    # An interface representing response is provided for each operation,
    # and _ResponseSuccess is embedded in this interface.
    # @example client.rbs
    #
    #   interface _OperationResponseSuccess
    #     include ::Seahorse::Client::_ResponseSuccess[Types::OperationOutput]
    #     def foo: () -> ::String
    #     def bar: () -> ::Integer
    #   end
    #   @client.operation: () -> _OperationResponseSuccess
    interface _ResponseSuccess[DATA]
      include _ResponseCommon

      def data: () -> DATA

      def data=: (DATA) -> DATA

      def error: () -> nil

      def error=: (nil) -> nil
    end

    # The interface for response error
    # It is useful to use annotation on ruby code
    # @example foo.rb
    #
    #   client = Client.new(raise_response_errors: false)
    #   # @type var response: ::Seahorse::Client::_ResponseError
    #   response = client.operation()
    #   response.error.message
    interface _ResponseError
      include _ResponseCommon

      def data: () -> nil

      def data=: (nil) -> nil

      def error: () -> StandardError

      def error=: (StandardError) -> StandardError
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
aws-sdk-core-3.214.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.213.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.212.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.211.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.210.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.209.1 sig/seahorse/client/response.rbs
aws-sdk-core-3.209.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.208.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.207.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.206.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.205.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.204.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.203.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.202.2 sig/seahorse/client/response.rbs
aws-sdk-core-3.202.1 sig/seahorse/client/response.rbs
aws-sdk-core-3.202.0 sig/seahorse/client/response.rbs
aws-sdk-core-3.201.5 sig/seahorse/client/response.rbs
aws-sdk-core-3.201.4 sig/seahorse/client/response.rbs
aws-sdk-core-3.201.3 sig/seahorse/client/response.rbs
aws-sdk-core-3.201.2 sig/seahorse/client/response.rbs