Class: Kafka::Protocol::ApiVersionsResponse::ApiInfo
- Inherits:
-
Object
- Object
- Kafka::Protocol::ApiVersionsResponse::ApiInfo
- Defined in:
- lib/kafka/protocol/api_versions_response.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#max_version ⇒ Object
readonly
Returns the value of attribute max_version.
-
#min_version ⇒ Object
readonly
Returns the value of attribute min_version.
Instance Method Summary collapse
- #api_name ⇒ Object
-
#initialize(api_key:, min_version:, max_version:) ⇒ ApiInfo
constructor
A new instance of ApiInfo.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(api_key:, min_version:, max_version:) ⇒ ApiInfo
Returns a new instance of ApiInfo.
8 9 10 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 8 def initialize(api_key:, min_version:, max_version:) @api_key, @min_version, @max_version = api_key, min_version, max_version end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 6 def api_key @api_key end |
#max_version ⇒ Object (readonly)
Returns the value of attribute max_version.
6 7 8 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 6 def max_version @max_version end |
#min_version ⇒ Object (readonly)
Returns the value of attribute min_version.
6 7 8 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 6 def min_version @min_version end |
Instance Method Details
#api_name ⇒ Object
12 13 14 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 12 def api_name Protocol.api_name(api_key) end |
#inspect ⇒ Object
20 21 22 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 20 def inspect "#<Kafka api version #{to_s}>" end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/kafka/protocol/api_versions_response.rb', line 16 def to_s "#{api_name}=#{min_version}..#{max_version}" end |