aws_sdk_transcribestreaming/operation/start_call_analytics_stream_transcription/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_call_analytics_stream_transcription::_start_call_analytics_stream_transcription_output::StartCallAnalyticsStreamTranscriptionOutputBuilder;
3
4pub use crate::operation::start_call_analytics_stream_transcription::_start_call_analytics_stream_transcription_input::StartCallAnalyticsStreamTranscriptionInputBuilder;
5
6impl crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder {
7                    /// Sends a request with this input using the given client.
8                    pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9                        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.start_call_analytics_stream_transcription();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `StartCallAnalyticsStreamTranscription`.
21/// 
22/// <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application. Use this operation for <a href="https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics.html">Call Analytics</a> transcriptions.</p>
23/// <p>The following parameters are required:</p>
24/// <ul>
25/// <li>
26/// <p><code>language-code</code> or <code>identify-language</code></p></li>
27/// <li>
28/// <p><code>media-encoding</code></p></li>
29/// <li>
30/// <p><code>sample-rate</code></p></li>
31/// </ul>
32/// <p>For more information on streaming with Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
33#[derive(::std::fmt::Debug)]
34pub struct StartCallAnalyticsStreamTranscriptionFluentBuilder {
35                handle: ::std::sync::Arc<crate::client::Handle>,
36                inner: crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder,
37config_override: ::std::option::Option<crate::config::Builder>,
38            }
39impl
40                crate::client::customize::internal::CustomizableSend<
41                    crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
42                    crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
43                > for StartCallAnalyticsStreamTranscriptionFluentBuilder
44            {
45                fn send(
46                    self,
47                    config_override: crate::config::Builder,
48                ) -> crate::client::customize::internal::BoxFuture<
49                    crate::client::customize::internal::SendResult<
50                        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput,
51                        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError,
52                    >,
53                > {
54                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55                }
56            }
57impl StartCallAnalyticsStreamTranscriptionFluentBuilder {
58    /// Creates a new `StartCallAnalyticsStreamTranscriptionFluentBuilder`.
59                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60                        Self {
61                            handle,
62                            inner: ::std::default::Default::default(),
63    config_override: ::std::option::Option::None,
64                        }
65                    }
66    /// Access the StartCallAnalyticsStreamTranscription as a reference.
67                    pub fn as_input(&self) -> &crate::operation::start_call_analytics_stream_transcription::builders::StartCallAnalyticsStreamTranscriptionInputBuilder {
68                        &self.inner
69                    }
70    /// Sends the request and returns the response.
71                    ///
72                    /// If an error occurs, an `SdkError` will be returned with additional details that
73                    /// can be matched against.
74                    ///
75                    /// By default, any retryable failures will be retried twice. Retry behavior
76                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77                    /// set when configuring the client.
78                    pub async fn send(self) -> ::std::result::Result<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
79                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
80                        let runtime_plugins = crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::operation_runtime_plugins(
81                            self.handle.runtime_plugins.clone(),
82                            &self.handle.conf,
83                            self.config_override,
84                        );
85                        let mut output =
86                        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::orchestrate(
87                            &runtime_plugins,
88                            input,
89                        )
90                        .await?;
91    
92                    // Converts any error encountered beyond this point into an `SdkError` response error
93                    // with an `HttpResponse`. However, since we have already exited the `orchestrate`
94                    // function, the original `HttpResponse` is no longer available and cannot be restored.
95                    // This means that header information from the original response has been lost.
96                    //
97                    // Note that the response body would have been consumed by the deserializer
98                    // regardless, even if the initial message was hypothetically processed during
99                    // the orchestrator's deserialization phase but later resulted in an error.
100                    fn response_error(
101                        err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>
102                    ) -> ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse> {
103                        ::aws_smithy_runtime_api::client::result::SdkError::response_error(err, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
104                            ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
105                            ::aws_smithy_types::body::SdkBody::empty()))
106                    }
107    
108                    let message = output.call_analytics_transcript_result_stream.try_recv_initial_response().await.map_err(response_error)?;
109    
110                    match message {
111                        ::std::option::Option::Some(_message) => {
112                            
113                            ::std::result::Result::Ok(output)
114                        }
115                        ::std::option::Option::None => ::std::result::Result::Ok(output),
116                    }
117                    }
118    
119                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
120                    pub fn customize(
121                        self,
122                    ) -> crate::client::customize::CustomizableOperation<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput, crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError, Self> {
123                        crate::client::customize::CustomizableOperation::new(self)
124                    }
125    pub(crate) fn config_override(
126                            mut self,
127                            config_override: impl ::std::convert::Into<crate::config::Builder>,
128                        ) -> Self {
129                            self.set_config_override(::std::option::Option::Some(config_override.into()));
130                            self
131                        }
132    
133                        pub(crate) fn set_config_override(
134                            &mut self,
135                            config_override: ::std::option::Option<crate::config::Builder>,
136                        ) -> &mut Self {
137                            self.config_override = config_override;
138                            self
139                        }
140    /// <p>Specify the language code that represents the language spoken in your audio.</p>
141    /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
142    pub fn language_code(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
143                    self.inner = self.inner.language_code(input);
144                    self
145                }
146    /// <p>Specify the language code that represents the language spoken in your audio.</p>
147    /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
148    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
149                    self.inner = self.inner.set_language_code(input);
150                    self
151                }
152    /// <p>Specify the language code that represents the language spoken in your audio.</p>
153    /// <p>For a list of languages supported with real-time Call Analytics, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p>
154    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
155                    self.inner.get_language_code()
156                }
157    /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
158    pub fn media_sample_rate_hertz(mut self, input: i32) -> Self {
159                    self.inner = self.inner.media_sample_rate_hertz(input);
160                    self
161                }
162    /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
163    pub fn set_media_sample_rate_hertz(mut self, input: ::std::option::Option<i32>) -> Self {
164                    self.inner = self.inner.set_media_sample_rate_hertz(input);
165                    self
166                }
167    /// <p>The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.</p>
168    pub fn get_media_sample_rate_hertz(&self) -> &::std::option::Option<i32> {
169                    self.inner.get_media_sample_rate_hertz()
170                }
171    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
172    /// <ul>
173    /// <li>
174    /// <p>FLAC</p></li>
175    /// <li>
176    /// <p>OPUS-encoded audio in an Ogg container</p></li>
177    /// <li>
178    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
179    /// </ul>
180    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
181    pub fn media_encoding(mut self, input: crate::types::MediaEncoding) -> Self {
182                    self.inner = self.inner.media_encoding(input);
183                    self
184                }
185    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
186    /// <ul>
187    /// <li>
188    /// <p>FLAC</p></li>
189    /// <li>
190    /// <p>OPUS-encoded audio in an Ogg container</p></li>
191    /// <li>
192    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
193    /// </ul>
194    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
195    pub fn set_media_encoding(mut self, input: ::std::option::Option<crate::types::MediaEncoding>) -> Self {
196                    self.inner = self.inner.set_media_encoding(input);
197                    self
198                }
199    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
200    /// <ul>
201    /// <li>
202    /// <p>FLAC</p></li>
203    /// <li>
204    /// <p>OPUS-encoded audio in an Ogg container</p></li>
205    /// <li>
206    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
207    /// </ul>
208    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio">Media formats</a>.</p>
209    pub fn get_media_encoding(&self) -> &::std::option::Option<crate::types::MediaEncoding> {
210                    self.inner.get_media_encoding()
211                }
212    /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
213    /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
214    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
215    pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216                    self.inner = self.inner.vocabulary_name(input.into());
217                    self
218                }
219    /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
220    /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
221    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
222    pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223                    self.inner = self.inner.set_vocabulary_name(input);
224                    self
225                }
226    /// <p>Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.</p>
227    /// <p>If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.</p>
228    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
229    pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
230                    self.inner.get_vocabulary_name()
231                }
232    /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
233    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234                    self.inner = self.inner.session_id(input.into());
235                    self
236                }
237    /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
238    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239                    self.inner = self.inner.set_session_id(input);
240                    self
241                }
242    /// <p>Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.</p>
243    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
244                    self.inner.get_session_id()
245                }
246    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
247    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
248    pub fn audio_stream(mut self, input: ::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>) -> Self {
249                    self.inner = self.inner.audio_stream(input);
250                    self
251                }
252    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
253    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
254    pub fn set_audio_stream(mut self, input: ::std::option::Option<::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>>) -> Self {
255                    self.inner = self.inner.set_audio_stream(input);
256                    self
257                }
258    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
259    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
260    pub fn get_audio_stream(&self) -> &::std::option::Option<::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>> {
261                    self.inner.get_audio_stream()
262                }
263    /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
264    /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
265    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
266    pub fn vocabulary_filter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267                    self.inner = self.inner.vocabulary_filter_name(input.into());
268                    self
269                }
270    /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
271    /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
272    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
273    pub fn set_vocabulary_filter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274                    self.inner = self.inner.set_vocabulary_filter_name(input);
275                    self
276                }
277    /// <p>Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.</p>
278    /// <p>If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.</p>
279    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
280    pub fn get_vocabulary_filter_name(&self) -> &::std::option::Option<::std::string::String> {
281                    self.inner.get_vocabulary_filter_name()
282                }
283    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
284    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
285    /// <p>To delete words, choose <code>remove</code>.</p>
286    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
287    pub fn vocabulary_filter_method(mut self, input: crate::types::VocabularyFilterMethod) -> Self {
288                    self.inner = self.inner.vocabulary_filter_method(input);
289                    self
290                }
291    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
292    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
293    /// <p>To delete words, choose <code>remove</code>.</p>
294    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
295    pub fn set_vocabulary_filter_method(mut self, input: ::std::option::Option<crate::types::VocabularyFilterMethod>) -> Self {
296                    self.inner = self.inner.set_vocabulary_filter_method(input);
297                    self
298                }
299    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
300    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
301    /// <p>To delete words, choose <code>remove</code>.</p>
302    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
303    pub fn get_vocabulary_filter_method(&self) -> &::std::option::Option<crate::types::VocabularyFilterMethod> {
304                    self.inner.get_vocabulary_filter_method()
305                }
306    /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
307    /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
308    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
309    pub fn language_model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
310                    self.inner = self.inner.language_model_name(input.into());
311                    self
312                }
313    /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
314    /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
315    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
316    pub fn set_language_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
317                    self.inner = self.inner.set_language_model_name(input);
318                    self
319                }
320    /// <p>Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.</p>
321    /// <p>The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.</p>
322    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
323    pub fn get_language_model_name(&self) -> &::std::option::Option<::std::string::String> {
324                    self.inner.get_language_model_name()
325                }
326    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
327    /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
328    /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
329    /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
330    pub fn identify_language(mut self, input: bool) -> Self {
331                    self.inner = self.inner.identify_language(input);
332                    self
333                }
334    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
335    /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
336    /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
337    /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
338    pub fn set_identify_language(mut self, input: ::std::option::Option<bool>) -> Self {
339                    self.inner = self.inner.set_identify_language(input);
340                    self
341                }
342    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
343    /// <p>If you include <code>IdentifyLanguage</code>, you must include a list of language codes, using <code>LanguageOptions</code>, that you think may be present in your audio stream. You must provide a minimum of two language selections.</p>
344    /// <p>You can also include a preferred language using <code>PreferredLanguage</code>. Adding a preferred language can help Amazon Transcribe identify the language faster than if you omit this parameter.</p>
345    /// <p>Note that you must include either <code>LanguageCode</code> or <code>IdentifyLanguage</code> in your request. If you include both parameters, your transcription job fails.</p>
346    pub fn get_identify_language(&self) -> &::std::option::Option<bool> {
347                    self.inner.get_identify_language()
348                }
349    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
350    /// <p>Including language options can improve the accuracy of language identification.</p>
351    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
352    /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
353    /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
354    /// </important>
355    pub fn language_options(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356                    self.inner = self.inner.language_options(input.into());
357                    self
358                }
359    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
360    /// <p>Including language options can improve the accuracy of language identification.</p>
361    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
362    /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
363    /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
364    /// </important>
365    pub fn set_language_options(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
366                    self.inner = self.inner.set_language_options(input);
367                    self
368                }
369    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
370    /// <p>Including language options can improve the accuracy of language identification.</p>
371    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
372    /// <p>For a list of languages supported with Call Analytics streaming, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><important>
373    /// <p>You can only include one language dialect per language per stream. For example, you cannot include <code>en-US</code> and <code>en-AU</code> in the same request.</p>
374    /// </important>
375    pub fn get_language_options(&self) -> &::std::option::Option<::std::string::String> {
376                    self.inner.get_language_options()
377                }
378    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
379    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
380    pub fn preferred_language(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
381                    self.inner = self.inner.preferred_language(input);
382                    self
383                }
384    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
385    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
386    pub fn set_preferred_language(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
387                    self.inner = self.inner.set_preferred_language(input);
388                    self
389                }
390    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
391    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
392    pub fn get_preferred_language(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
393                    self.inner.get_preferred_language()
394                }
395    /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
396    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
397    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
398    /// </important>
399    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
400    pub fn vocabulary_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
401                    self.inner = self.inner.vocabulary_names(input.into());
402                    self
403                }
404    /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
405    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
406    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
407    /// </important>
408    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
409    pub fn set_vocabulary_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410                    self.inner = self.inner.set_vocabulary_names(input);
411                    self
412                }
413    /// <p>Specify the names of the custom vocabularies that you want to use when processing your Call Analytics transcription. Note that vocabulary names are case sensitive.</p>
414    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
415    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary with your transcription, use the <code>VocabularyName</code> parameter instead.</p>
416    /// </important>
417    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
418    pub fn get_vocabulary_names(&self) -> &::std::option::Option<::std::string::String> {
419                    self.inner.get_vocabulary_names()
420                }
421    /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
422    /// <p>These filters serve to customize the transcript output.</p><important>
423    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
424    /// </important>
425    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
426    pub fn vocabulary_filter_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427                    self.inner = self.inner.vocabulary_filter_names(input.into());
428                    self
429                }
430    /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
431    /// <p>These filters serve to customize the transcript output.</p><important>
432    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
433    /// </important>
434    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
435    pub fn set_vocabulary_filter_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
436                    self.inner = self.inner.set_vocabulary_filter_names(input);
437                    self
438                }
439    /// <p>Specify the names of the custom vocabulary filters that you want to use when processing your Call Analytics transcription. Note that vocabulary filter names are case sensitive.</p>
440    /// <p>These filters serve to customize the transcript output.</p><important>
441    /// <p>This parameter is only intended for use <b>with</b> the <code>IdentifyLanguage</code> parameter. If you're <b>not</b> including <code>IdentifyLanguage</code> in your request and want to use a custom vocabulary filter with your transcription, use the <code>VocabularyFilterName</code> parameter instead.</p>
442    /// </important>
443    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html">Using vocabulary filtering with unwanted words</a>.</p>
444    pub fn get_vocabulary_filter_names(&self) -> &::std::option::Option<::std::string::String> {
445                    self.inner.get_vocabulary_filter_names()
446                }
447    /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
448    pub fn enable_partial_results_stabilization(mut self, input: bool) -> Self {
449                    self.inner = self.inner.enable_partial_results_stabilization(input);
450                    self
451                }
452    /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
453    pub fn set_enable_partial_results_stabilization(mut self, input: ::std::option::Option<bool>) -> Self {
454                    self.inner = self.inner.set_enable_partial_results_stabilization(input);
455                    self
456                }
457    /// <p>Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
458    pub fn get_enable_partial_results_stabilization(&self) -> &::std::option::Option<bool> {
459                    self.inner.get_enable_partial_results_stabilization()
460                }
461    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
462    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
463    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
464    pub fn partial_results_stability(mut self, input: crate::types::PartialResultsStability) -> Self {
465                    self.inner = self.inner.partial_results_stability(input);
466                    self
467                }
468    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
469    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
470    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
471    pub fn set_partial_results_stability(mut self, input: ::std::option::Option<crate::types::PartialResultsStability>) -> Self {
472                    self.inner = self.inner.set_partial_results_stability(input);
473                    self
474                }
475    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
476    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
477    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization">Partial-result stabilization</a>.</p>
478    pub fn get_partial_results_stability(&self) -> &::std::option::Option<crate::types::PartialResultsStability> {
479                    self.inner.get_partial_results_stability()
480                }
481    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
482    /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
483    /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
484    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
485    pub fn content_identification_type(mut self, input: crate::types::ContentIdentificationType) -> Self {
486                    self.inner = self.inner.content_identification_type(input);
487                    self
488                }
489    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
490    /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
491    /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
492    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
493    pub fn set_content_identification_type(mut self, input: ::std::option::Option<crate::types::ContentIdentificationType>) -> Self {
494                    self.inner = self.inner.set_content_identification_type(input);
495                    self
496                }
497    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
498    /// <p>Content identification is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is flagged upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is identified.</p>
499    /// <p>You can’t set <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
500    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
501    pub fn get_content_identification_type(&self) -> &::std::option::Option<crate::types::ContentIdentificationType> {
502                    self.inner.get_content_identification_type()
503                }
504    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
505    /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
506    /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
507    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
508    pub fn content_redaction_type(mut self, input: crate::types::ContentRedactionType) -> Self {
509                    self.inner = self.inner.content_redaction_type(input);
510                    self
511                }
512    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
513    /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
514    /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
515    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
516    pub fn set_content_redaction_type(mut self, input: ::std::option::Option<crate::types::ContentRedactionType>) -> Self {
517                    self.inner = self.inner.set_content_redaction_type(input);
518                    self
519                }
520    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
521    /// <p>Content redaction is performed at the segment level; PII specified in <code>PiiEntityTypes</code> is redacted upon complete transcription of an audio segment. If you don't include <code>PiiEntityTypes</code> in your request, all PII is redacted.</p>
522    /// <p>You can’t set <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
523    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html">Redacting or identifying personally identifiable information</a>.</p>
524    pub fn get_content_redaction_type(&self) -> &::std::option::Option<crate::types::ContentRedactionType> {
525                    self.inner.get_content_redaction_type()
526                }
527    /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
528    /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
529    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
530    /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
531    pub fn pii_entity_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
532                    self.inner = self.inner.pii_entity_types(input.into());
533                    self
534                }
535    /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
536    /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
537    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
538    /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
539    pub fn set_pii_entity_types(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
540                    self.inner = self.inner.set_pii_entity_types(input);
541                    self
542                }
543    /// <p>Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select <code>ALL</code>.</p>
544    /// <p>Values must be comma-separated and can include: <code>ADDRESS</code>, <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>, <code>CREDIT_DEBIT_CVV</code>, <code>CREDIT_DEBIT_EXPIRY</code>, <code>CREDIT_DEBIT_NUMBER</code>, <code>EMAIL</code>, <code>NAME</code>, <code>PHONE</code>, <code>PIN</code>, <code>SSN</code>, or <code>ALL</code>.</p>
545    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
546    /// <p>If you include <code>ContentRedactionType</code> or <code>ContentIdentificationType</code> in your request, but do not include <code>PiiEntityTypes</code>, all PII is redacted or identified.</p>
547    pub fn get_pii_entity_types(&self) -> &::std::option::Option<::std::string::String> {
548                    self.inner.get_pii_entity_types()
549                }
550}
551