// snippet-sourcedescription:[StreamTranscriptionBehavior.java is an interface that you implement for streaming transcription.]
// snippet-service:[transcribe]
// snippet-keyword:[Java]
// snippet-sourcesyntax:[java]
// snippet-keyword:[Amazon Transcribe]
// snippet-keyword:[Code Sample]
// snippet-keyword:[TranscribeStreamingAsyncClient]
// snippet-keyword:[StartStreamTranscriptionResponse]
// snippet-sourcetype:[snippet]
// snippet-sourcedate:[2019-01-10]
// snippet-sourceauthor:[AWS]
// snippet-start:[transcribe.java-streaming-client-behavior]
/**
 * COPYRIGHT:
 * <p>
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
package com.amazonaws.transcribestreaming;

import software.amazon.awssdk.services.transcribestreaming.model.StartStreamTranscriptionResponse;
import software.amazon.awssdk.services.transcribestreaming.model.TranscriptResultStream;

/**
 * Defines how a stream response should be handled.
 * You should build a class implementing this interface to define the behavior.
 */
public interface StreamTranscriptionBehavior {
    /**
     * Defines how to respond when encountering an error on the stream transcription.
     *
     * @param e The exception
     */
    void onError(Throwable e);

    /**
     * Defines how to respond to the Transcript result stream.
     *
     * @param e The TranscriptResultStream event
     */
    void onStream(TranscriptResultStream e);

    /**
     * Defines what to do on initiating a stream connection with the service.
     *
     * @param r StartStreamTranscriptionResponse
     */
    void onResponse(StartStreamTranscriptionResponse r);


    /**
     * Defines what to do on stream completion
     */
    void onComplete();
}
// snippet-end:[transcribe.java-streaming-client-behavior]
@@ -567,31 +567,8 @@
 **%0D%0A
- * COPYRIGHT:%0D%0A * %3Cp%3E%0D%0A
  * C
@@ -640,18 +640,27 @@
 %0D%0A *
- %3Cp%3E
 %0D%0A * 
-L
+This file is l
 icen
@@ -786,20 +786,16 @@
 License.
-%0D%0A *
  A copy 
@@ -796,16 +796,20 @@
  copy of
+%0D%0A *
  the Lic
@@ -826,28 +826,24 @@
 cated at%0D%0A *
- %3Cp%3E
 %0D%0A * http://
@@ -846,104 +846,41 @@
 p://
-www.apache.org/licenses/LICENSE-
+aws.amazon.com/apache
 2.0
+/
 %0D%0A *
- %3Cp%3E
 %0D%0A *
- or in the %22license%22 file accompanying this file.
  Thi
@@ -900,20 +900,16 @@
 tributed
-%0D%0A *
  on an %22
@@ -943,16 +943,20 @@
 NTIES OR
+%0D%0A *
  CONDITI
@@ -978,20 +978,16 @@
 , either
-%0D%0A *
  express
@@ -1022,16 +1022,20 @@
  for the
+%0D%0A *
  specifi
@@ -1054,20 +1054,16 @@
 overning
-%0D%0A *
  permiss
@@ -1103,16 +1103,20 @@
 cense.%0D%0A
+ *%0D%0A
  */%0D%0Apac
@@ -2256,28 +2256,30 @@
 a-streaming-client-behavior%5D
+%0D%0A

Update StreamTranscriptionBehavior.java