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.



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

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



323
324
325
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 323

def event_emitter
  @event_emitter
end

Instance Method Details

#on_bad_request_exception_event(&block) ⇒ Object



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

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

#on_conflict_exception_event(&block) ⇒ Object



289
290
291
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 289

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

#on_error_event(&block) ⇒ Object



297
298
299
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 297

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

#on_event(&block) ⇒ Object



309
310
311
312
313
314
315
316
317
318
319
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 309

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



301
302
303
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 301

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

#on_internal_failure_exception_event(&block) ⇒ Object



285
286
287
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 285

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



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

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



293
294
295
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 293

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

#on_transcript_event_event(&block) ⇒ Object



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

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

#on_unknown_event(&block) ⇒ Object



305
306
307
# File 'lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 305

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