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

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

Instance Method Summary collapse

Constructor Details

#initializeTranscriptResultStream

Returns a new instance of TranscriptResultStream.



121
122
123
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 121

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

Instance Method Details

#on_bad_request_exception_event(&block) ⇒ Object



129
130
131
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 129

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

#on_conflict_exception_event(&block) ⇒ Object



141
142
143
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 141

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

#on_error_event(&block) ⇒ Object



149
150
151
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 149

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

#on_event(&block) ⇒ Object



161
162
163
164
165
166
167
168
169
170
171
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 161

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



153
154
155
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 153

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

#on_internal_failure_exception_event(&block) ⇒ Object



137
138
139
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 137

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



133
134
135
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 133

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



145
146
147
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 145

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

#on_transcript_event_event(&block) ⇒ Object



125
126
127
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 125

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

#on_unknown_event(&block) ⇒ Object



157
158
159
# File 'gems/aws-sdk-transcribestreamingservice/lib/aws-sdk-transcribestreamingservice/event_streams.rb', line 157

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