Class: Aws::TranscribeStreamingService::EventStreams::TranscriptResultStream

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTranscriptResultStream

Returns a new instance of TranscriptResultStream.



245
246
247
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 245

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



299
300
301
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 299

def event_emitter
  @event_emitter
end

Instance Method Details

#on_bad_request_exception_event(&block) ⇒ Object



253
254
255
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 253

def on_bad_request_exception_event(&block)
  @event_emitter.on(:bad_request_exception, block) if block_given?
end

#on_conflict_exception_event(&block) ⇒ Object



265
266
267
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 265

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

#on_error_event(&block) ⇒ Object



273
274
275
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 273

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

#on_event(&block) ⇒ Object



285
286
287
288
289
290
291
292
293
294
295
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 285

def on_event(&block)
  on_transcript_event_event(&block)
  on_bad_request_exception_event(&block)
  on_limit_exceeded_exception_event(&block)
  on_internal_failure_exception_event(&block)
  on_conflict_exception_event(&block)
  on_service_unavailable_exception_event(&block)
  on_error_event(&block)
  on_initial_response_event(&block)
  on_unknown_event(&block)
end

#on_initial_response_event(&block) ⇒ Object



277
278
279
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 277

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

#on_internal_failure_exception_event(&block) ⇒ Object



261
262
263
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 261

def on_internal_failure_exception_event(&block)
  @event_emitter.on(:internal_failure_exception, block) if block_given?
end

#on_limit_exceeded_exception_event(&block) ⇒ Object



257
258
259
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 257

def on_limit_exceeded_exception_event(&block)
  @event_emitter.on(:limit_exceeded_exception, block) if block_given?
end

#on_service_unavailable_exception_event(&block) ⇒ Object



269
270
271
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 269

def on_service_unavailable_exception_event(&block)
  @event_emitter.on(:service_unavailable_exception, block) if block_given?
end

#on_transcript_event_event(&block) ⇒ Object



249
250
251
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 249

def on_transcript_event_event(&block)
  @event_emitter.on(:transcript_event, block) if block_given?
end

#on_unknown_event(&block) ⇒ Object



281
282
283
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 281

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