Class: Aws::BedrockAgentRuntime::EventStreams::ResponseStream

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-bedrockagentruntime/event_streams.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResponseStream

Returns a new instance of ResponseStream.



103
104
105
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 103

def initialize
  @event_emitter = Aws::EventEmitter.new
end

Instance Attribute Details

#event_emitterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Aws::EventEmitter.

Returns:

  • Aws::EventEmitter



197
198
199
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 197

def event_emitter
  @event_emitter
end

Instance Method Details

#on_access_denied_exception_event(&block) ⇒ Object



107
108
109
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 107

def on_access_denied_exception_event(&block)
  @event_emitter.on(:access_denied_exception, block) if block_given?
end

#on_bad_gateway_exception_event(&block) ⇒ Object



111
112
113
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 111

def on_bad_gateway_exception_event(&block)
  @event_emitter.on(:bad_gateway_exception, block) if block_given?
end

#on_chunk_event(&block) ⇒ Object



115
116
117
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 115

def on_chunk_event(&block)
  @event_emitter.on(:chunk, block) if block_given?
end

#on_conflict_exception_event(&block) ⇒ Object



119
120
121
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 119

def on_conflict_exception_event(&block)
  @event_emitter.on(:conflict_exception, block) if block_given?
end

#on_dependency_failed_exception_event(&block) ⇒ Object



123
124
125
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 123

def on_dependency_failed_exception_event(&block)
  @event_emitter.on(:dependency_failed_exception, block) if block_given?
end

#on_error_event(&block) ⇒ Object



163
164
165
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 163

def on_error_event(&block)
  @event_emitter.on(:error, block) if block_given?
end

#on_event(&block) ⇒ Object



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 175

def on_event(&block)
  on_access_denied_exception_event(&block)
  on_bad_gateway_exception_event(&block)
  on_chunk_event(&block)
  on_conflict_exception_event(&block)
  on_dependency_failed_exception_event(&block)
  on_files_event(&block)
  on_internal_server_exception_event(&block)
  on_model_not_ready_exception_event(&block)
  on_resource_not_found_exception_event(&block)
  on_return_control_event(&block)
  on_service_quota_exceeded_exception_event(&block)
  on_throttling_exception_event(&block)
  on_trace_event(&block)
  on_validation_exception_event(&block)
  on_error_event(&block)
  on_initial_response_event(&block)
  on_unknown_event(&block)
end

#on_files_event(&block) ⇒ Object



127
128
129
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 127

def on_files_event(&block)
  @event_emitter.on(:files, block) if block_given?
end

#on_initial_response_event(&block) ⇒ Object



167
168
169
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 167

def on_initial_response_event(&block)
  @event_emitter.on(:initial_response, block) if block_given?
end

#on_internal_server_exception_event(&block) ⇒ Object



131
132
133
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 131

def on_internal_server_exception_event(&block)
  @event_emitter.on(:internal_server_exception, block) if block_given?
end

#on_model_not_ready_exception_event(&block) ⇒ Object



135
136
137
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 135

def on_model_not_ready_exception_event(&block)
  @event_emitter.on(:model_not_ready_exception, block) if block_given?
end

#on_resource_not_found_exception_event(&block) ⇒ Object



139
140
141
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 139

def on_resource_not_found_exception_event(&block)
  @event_emitter.on(:resource_not_found_exception, block) if block_given?
end

#on_return_control_event(&block) ⇒ Object



143
144
145
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 143

def on_return_control_event(&block)
  @event_emitter.on(:return_control, block) if block_given?
end

#on_service_quota_exceeded_exception_event(&block) ⇒ Object



147
148
149
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 147

def on_service_quota_exceeded_exception_event(&block)
  @event_emitter.on(:service_quota_exceeded_exception, block) if block_given?
end

#on_throttling_exception_event(&block) ⇒ Object



151
152
153
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 151

def on_throttling_exception_event(&block)
  @event_emitter.on(:throttling_exception, block) if block_given?
end

#on_trace_event(&block) ⇒ Object



155
156
157
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 155

def on_trace_event(&block)
  @event_emitter.on(:trace, block) if block_given?
end

#on_unknown_event(&block) ⇒ Object



171
172
173
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 171

def on_unknown_event(&block)
  @event_emitter.on(:unknown_event, block) if block_given?
end

#on_validation_exception_event(&block) ⇒ Object



159
160
161
# File 'lib/aws-sdk-bedrockagentruntime/event_streams.rb', line 159

def on_validation_exception_event(&block)
  @event_emitter.on(:validation_exception, block) if block_given?
end