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. Note: retries are enabled by default when using
78                    /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
79                    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>> {
80                        let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
81                        let runtime_plugins = crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::operation_runtime_plugins(
82                            self.handle.runtime_plugins.clone(),
83                            &self.handle.conf,
84                            self.config_override,
85                        );
86                        let mut output =
87                        crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscription::orchestrate(
88                            &runtime_plugins,
89                            input,
90                        )
91                        .await?;
92    
93                    // Converts any error encountered beyond this point into an `SdkError` response error
94                    // with an `HttpResponse`. However, since we have already exited the `orchestrate`
95                    // function, the original `HttpResponse` is no longer available and cannot be restored.
96                    // This means that header information from the original response has been lost.
97                    //
98                    // Note that the response body would have been consumed by the deserializer
99                    // regardless, even if the initial message was hypothetically processed during
100                    // the orchestrator's deserialization phase but later resulted in an error.
101                    fn response_error(
102                        err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>
103                    ) -> ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse> {
104                        ::aws_smithy_runtime_api::client::result::SdkError::response_error(err, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
105                            ::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
106                            ::aws_smithy_types::body::SdkBody::empty()))
107                    }
108    
109                    let message = output.call_analytics_transcript_result_stream.try_recv_initial_response().await.map_err(response_error)?;
110    
111                    match message {
112                        ::std::option::Option::Some(_message) => {
113                            
114                            ::std::result::Result::Ok(output)
115                        }
116                        ::std::option::Option::None => ::std::result::Result::Ok(output),
117                    }
118                    }
119    
120                    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
121                    pub fn customize(
122                        self,
123                    ) -> crate::client::customize::CustomizableOperation<crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionOutput, crate::operation::start_call_analytics_stream_transcription::StartCallAnalyticsStreamTranscriptionError, Self> {
124                        crate::client::customize::CustomizableOperation::new(self)
125                    }
126    pub(crate) fn config_override(
127                            mut self,
128                            config_override: impl ::std::convert::Into<crate::config::Builder>,
129                        ) -> Self {
130                            self.set_config_override(::std::option::Option::Some(config_override.into()));
131                            self
132                        }
133    
134                        pub(crate) fn set_config_override(
135                            &mut self,
136                            config_override: ::std::option::Option<crate::config::Builder>,
137                        ) -> &mut Self {
138                            self.config_override = config_override;
139                            self
140                        }
141    /// <p>Specify the language code that represents the language spoken in your audio.</p>
142    /// <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>
143    pub fn language_code(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
144                    self.inner = self.inner.language_code(input);
145                    self
146                }
147    /// <p>Specify the language code that represents the language spoken in your audio.</p>
148    /// <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>
149    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
150                    self.inner = self.inner.set_language_code(input);
151                    self
152                }
153    /// <p>Specify the language code that represents the language spoken in your audio.</p>
154    /// <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>
155    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
156                    self.inner.get_language_code()
157                }
158    /// <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>
159    pub fn media_sample_rate_hertz(mut self, input: i32) -> Self {
160                    self.inner = self.inner.media_sample_rate_hertz(input);
161                    self
162                }
163    /// <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>
164    pub fn set_media_sample_rate_hertz(mut self, input: ::std::option::Option<i32>) -> Self {
165                    self.inner = self.inner.set_media_sample_rate_hertz(input);
166                    self
167                }
168    /// <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>
169    pub fn get_media_sample_rate_hertz(&self) -> &::std::option::Option<i32> {
170                    self.inner.get_media_sample_rate_hertz()
171                }
172    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
173    /// <ul>
174    /// <li>
175    /// <p>FLAC</p></li>
176    /// <li>
177    /// <p>OPUS-encoded audio in an Ogg container</p></li>
178    /// <li>
179    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
180    /// </ul>
181    /// <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>
182    pub fn media_encoding(mut self, input: crate::types::MediaEncoding) -> Self {
183                    self.inner = self.inner.media_encoding(input);
184                    self
185                }
186    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
187    /// <ul>
188    /// <li>
189    /// <p>FLAC</p></li>
190    /// <li>
191    /// <p>OPUS-encoded audio in an Ogg container</p></li>
192    /// <li>
193    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
194    /// </ul>
195    /// <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>
196    pub fn set_media_encoding(mut self, input: ::std::option::Option<crate::types::MediaEncoding>) -> Self {
197                    self.inner = self.inner.set_media_encoding(input);
198                    self
199                }
200    /// <p>Specify the encoding of your input audio. Supported formats are:</p>
201    /// <ul>
202    /// <li>
203    /// <p>FLAC</p></li>
204    /// <li>
205    /// <p>OPUS-encoded audio in an Ogg container</p></li>
206    /// <li>
207    /// <p>PCM (only signed 16-bit little-endian audio formats, which does not include WAV)</p></li>
208    /// </ul>
209    /// <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>
210    pub fn get_media_encoding(&self) -> &::std::option::Option<crate::types::MediaEncoding> {
211                    self.inner.get_media_encoding()
212                }
213    /// <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>
214    /// <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>
215    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
216    pub fn vocabulary_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217                    self.inner = self.inner.vocabulary_name(input.into());
218                    self
219                }
220    /// <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>
221    /// <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>
222    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
223    pub fn set_vocabulary_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224                    self.inner = self.inner.set_vocabulary_name(input);
225                    self
226                }
227    /// <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>
228    /// <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>
229    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
230    pub fn get_vocabulary_name(&self) -> &::std::option::Option<::std::string::String> {
231                    self.inner.get_vocabulary_name()
232                }
233    /// <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>
234    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235                    self.inner = self.inner.session_id(input.into());
236                    self
237                }
238    /// <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>
239    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240                    self.inner = self.inner.set_session_id(input);
241                    self
242                }
243    /// <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>
244    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
245                    self.inner.get_session_id()
246                }
247    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
248    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
249    pub fn audio_stream(mut self, input: ::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>) -> Self {
250                    self.inner = self.inner.audio_stream(input);
251                    self
252                }
253    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
254    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
255    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 {
256                    self.inner = self.inner.set_audio_stream(input);
257                    self
258                }
259    /// <p>An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.</p>
260    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
261    pub fn get_audio_stream(&self) -> &::std::option::Option<::aws_smithy_http::event_stream::EventStreamSender<crate::types::AudioStream, crate::types::error::AudioStreamError>> {
262                    self.inner.get_audio_stream()
263                }
264    /// <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>
265    /// <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>
266    /// <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>
267    pub fn vocabulary_filter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268                    self.inner = self.inner.vocabulary_filter_name(input.into());
269                    self
270                }
271    /// <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>
272    /// <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>
273    /// <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>
274    pub fn set_vocabulary_filter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275                    self.inner = self.inner.set_vocabulary_filter_name(input);
276                    self
277                }
278    /// <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>
279    /// <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>
280    /// <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>
281    pub fn get_vocabulary_filter_name(&self) -> &::std::option::Option<::std::string::String> {
282                    self.inner.get_vocabulary_filter_name()
283                }
284    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
285    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
286    /// <p>To delete words, choose <code>remove</code>.</p>
287    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
288    pub fn vocabulary_filter_method(mut self, input: crate::types::VocabularyFilterMethod) -> Self {
289                    self.inner = self.inner.vocabulary_filter_method(input);
290                    self
291                }
292    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
293    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
294    /// <p>To delete words, choose <code>remove</code>.</p>
295    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
296    pub fn set_vocabulary_filter_method(mut self, input: ::std::option::Option<crate::types::VocabularyFilterMethod>) -> Self {
297                    self.inner = self.inner.set_vocabulary_filter_method(input);
298                    self
299                }
300    /// <p>Specify how you want your vocabulary filter applied to your transcript.</p>
301    /// <p>To replace words with <code>***</code>, choose <code>mask</code>.</p>
302    /// <p>To delete words, choose <code>remove</code>.</p>
303    /// <p>To flag words without changing them, choose <code>tag</code>.</p>
304    pub fn get_vocabulary_filter_method(&self) -> &::std::option::Option<crate::types::VocabularyFilterMethod> {
305                    self.inner.get_vocabulary_filter_method()
306                }
307    /// <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>
308    /// <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>
309    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
310    pub fn language_model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311                    self.inner = self.inner.language_model_name(input.into());
312                    self
313                }
314    /// <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>
315    /// <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>
316    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
317    pub fn set_language_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318                    self.inner = self.inner.set_language_model_name(input);
319                    self
320                }
321    /// <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>
322    /// <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>
323    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html">Custom language models</a>.</p>
324    pub fn get_language_model_name(&self) -> &::std::option::Option<::std::string::String> {
325                    self.inner.get_language_model_name()
326                }
327    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
328    /// <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>
329    /// <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>
330    /// <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>
331    pub fn identify_language(mut self, input: bool) -> Self {
332                    self.inner = self.inner.identify_language(input);
333                    self
334                }
335    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
336    /// <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>
337    /// <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>
338    /// <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>
339    pub fn set_identify_language(mut self, input: ::std::option::Option<bool>) -> Self {
340                    self.inner = self.inner.set_identify_language(input);
341                    self
342                }
343    /// <p>Enables automatic language identification for your Call Analytics transcription.</p>
344    /// <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>
345    /// <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>
346    /// <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>
347    pub fn get_identify_language(&self) -> &::std::option::Option<bool> {
348                    self.inner.get_identify_language()
349                }
350    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
351    /// <p>Including language options can improve the accuracy of language identification.</p>
352    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
353    /// <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>
354    /// <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>
355    /// </important>
356    pub fn language_options(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357                    self.inner = self.inner.language_options(input.into());
358                    self
359                }
360    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
361    /// <p>Including language options can improve the accuracy of language identification.</p>
362    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
363    /// <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>
364    /// <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>
365    /// </important>
366    pub fn set_language_options(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367                    self.inner = self.inner.set_language_options(input);
368                    self
369                }
370    /// <p>Specify two or more language codes that represent the languages you think may be present in your media.</p>
371    /// <p>Including language options can improve the accuracy of language identification.</p>
372    /// <p>If you include <code>LanguageOptions</code> in your request, you must also include <code>IdentifyLanguage</code>.</p>
373    /// <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>
374    /// <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>
375    /// </important>
376    pub fn get_language_options(&self) -> &::std::option::Option<::std::string::String> {
377                    self.inner.get_language_options()
378                }
379    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
380    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
381    pub fn preferred_language(mut self, input: crate::types::CallAnalyticsLanguageCode) -> Self {
382                    self.inner = self.inner.preferred_language(input);
383                    self
384                }
385    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
386    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
387    pub fn set_preferred_language(mut self, input: ::std::option::Option<crate::types::CallAnalyticsLanguageCode>) -> Self {
388                    self.inner = self.inner.set_preferred_language(input);
389                    self
390                }
391    /// <p>Specify a preferred language from the subset of languages codes you specified in <code>LanguageOptions</code>.</p>
392    /// <p>You can only use this parameter if you've included <code>IdentifyLanguage</code> and <code>LanguageOptions</code> in your request.</p>
393    pub fn get_preferred_language(&self) -> &::std::option::Option<crate::types::CallAnalyticsLanguageCode> {
394                    self.inner.get_preferred_language()
395                }
396    /// <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>
397    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
398    /// <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>
399    /// </important>
400    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
401    pub fn vocabulary_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402                    self.inner = self.inner.vocabulary_names(input.into());
403                    self
404                }
405    /// <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>
406    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
407    /// <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>
408    /// </important>
409    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
410    pub fn set_vocabulary_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
411                    self.inner = self.inner.set_vocabulary_names(input);
412                    self
413                }
414    /// <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>
415    /// <p>If the custom vocabulary's language doesn't match the identified media language, it won't be applied to the transcription.</p><important>
416    /// <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>
417    /// </important>
418    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html">Custom vocabularies</a>.</p>
419    pub fn get_vocabulary_names(&self) -> &::std::option::Option<::std::string::String> {
420                    self.inner.get_vocabulary_names()
421                }
422    /// <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>
423    /// <p>These filters serve to customize the transcript output.</p><important>
424    /// <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>
425    /// </important>
426    /// <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>
427    pub fn vocabulary_filter_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
428                    self.inner = self.inner.vocabulary_filter_names(input.into());
429                    self
430                }
431    /// <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>
432    /// <p>These filters serve to customize the transcript output.</p><important>
433    /// <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>
434    /// </important>
435    /// <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>
436    pub fn set_vocabulary_filter_names(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
437                    self.inner = self.inner.set_vocabulary_filter_names(input);
438                    self
439                }
440    /// <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>
441    /// <p>These filters serve to customize the transcript output.</p><important>
442    /// <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>
443    /// </important>
444    /// <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>
445    pub fn get_vocabulary_filter_names(&self) -> &::std::option::Option<::std::string::String> {
446                    self.inner.get_vocabulary_filter_names()
447                }
448    /// <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>
449    pub fn enable_partial_results_stabilization(mut self, input: bool) -> Self {
450                    self.inner = self.inner.enable_partial_results_stabilization(input);
451                    self
452                }
453    /// <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>
454    pub fn set_enable_partial_results_stabilization(mut self, input: ::std::option::Option<bool>) -> Self {
455                    self.inner = self.inner.set_enable_partial_results_stabilization(input);
456                    self
457                }
458    /// <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>
459    pub fn get_enable_partial_results_stabilization(&self) -> &::std::option::Option<bool> {
460                    self.inner.get_enable_partial_results_stabilization()
461                }
462    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
463    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
464    /// <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>
465    pub fn partial_results_stability(mut self, input: crate::types::PartialResultsStability) -> Self {
466                    self.inner = self.inner.partial_results_stability(input);
467                    self
468                }
469    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
470    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
471    /// <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>
472    pub fn set_partial_results_stability(mut self, input: ::std::option::Option<crate::types::PartialResultsStability>) -> Self {
473                    self.inner = self.inner.set_partial_results_stability(input);
474                    self
475                }
476    /// <p>Specify the level of stability to use when you enable partial results stabilization (<code>EnablePartialResultsStabilization</code>).</p>
477    /// <p>Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.</p>
478    /// <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>
479    pub fn get_partial_results_stability(&self) -> &::std::option::Option<crate::types::PartialResultsStability> {
480                    self.inner.get_partial_results_stability()
481                }
482    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
483    /// <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>
484    /// <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>
485    /// <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>
486    pub fn content_identification_type(mut self, input: crate::types::ContentIdentificationType) -> Self {
487                    self.inner = self.inner.content_identification_type(input);
488                    self
489                }
490    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
491    /// <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>
492    /// <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>
493    /// <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>
494    pub fn set_content_identification_type(mut self, input: ::std::option::Option<crate::types::ContentIdentificationType>) -> Self {
495                    self.inner = self.inner.set_content_identification_type(input);
496                    self
497                }
498    /// <p>Labels all personally identifiable information (PII) identified in your transcript.</p>
499    /// <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>
500    /// <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>
501    /// <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>
502    pub fn get_content_identification_type(&self) -> &::std::option::Option<crate::types::ContentIdentificationType> {
503                    self.inner.get_content_identification_type()
504                }
505    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
506    /// <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>
507    /// <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>
508    /// <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>
509    pub fn content_redaction_type(mut self, input: crate::types::ContentRedactionType) -> Self {
510                    self.inner = self.inner.content_redaction_type(input);
511                    self
512                }
513    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
514    /// <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>
515    /// <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>
516    /// <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>
517    pub fn set_content_redaction_type(mut self, input: ::std::option::Option<crate::types::ContentRedactionType>) -> Self {
518                    self.inner = self.inner.set_content_redaction_type(input);
519                    self
520                }
521    /// <p>Redacts all personally identifiable information (PII) identified in your transcript.</p>
522    /// <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>
523    /// <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>
524    /// <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>
525    pub fn get_content_redaction_type(&self) -> &::std::option::Option<crate::types::ContentRedactionType> {
526                    self.inner.get_content_redaction_type()
527                }
528    /// <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>
529    /// <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>
530    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
531    /// <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>
532    pub fn pii_entity_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
533                    self.inner = self.inner.pii_entity_types(input.into());
534                    self
535                }
536    /// <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>
537    /// <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>
538    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
539    /// <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>
540    pub fn set_pii_entity_types(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
541                    self.inner = self.inner.set_pii_entity_types(input);
542                    self
543                }
544    /// <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>
545    /// <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>
546    /// <p>Note that if you include <code>PiiEntityTypes</code> in your request, you must also include <code>ContentIdentificationType</code> or <code>ContentRedactionType</code>.</p>
547    /// <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>
548    pub fn get_pii_entity_types(&self) -> &::std::option::Option<::std::string::String> {
549                    self.inner.get_pii_entity_types()
550                }
551}
552