aws_sdk_transcribe/operation/start_call_analytics_job/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_call_analytics_job::_start_call_analytics_job_output::StartCallAnalyticsJobOutputBuilder;
3
4pub use crate::operation::start_call_analytics_job::_start_call_analytics_job_input::StartCallAnalyticsJobInputBuilder;
5
6impl crate::operation::start_call_analytics_job::builders::StartCallAnalyticsJobInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::start_call_analytics_job::StartCallAnalyticsJobOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::start_call_analytics_job::StartCallAnalyticsJobError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.start_call_analytics_job();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `StartCallAnalyticsJob`.
24///
25/// <p>Transcribes the audio from a customer service call and applies any additional Request Parameters you choose to include in your request.</p>
26/// <p>In addition to many standard transcription features, Call Analytics provides you with call characteristics, call summarization, speaker sentiment, and optional redaction of your text transcript and your audio file. You can also apply custom categories to flag specified conditions. To learn more about these features and insights, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics.html">Analyzing call center audio with Call Analytics</a>.</p>
27/// <p>If you want to apply categories to your Call Analytics job, you must create them before submitting your job request. Categories cannot be retroactively applied to a job. To create a new category, use the operation. To learn more about Call Analytics categories, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tca-categories-batch.html">Creating categories for post-call transcriptions</a> and <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tca-categories-stream.html">Creating categories for real-time transcriptions</a>.</p>
28/// <p>To make a <code>StartCallAnalyticsJob</code> request, you must first upload your media file into an Amazon S3 bucket; you can then specify the Amazon S3 location of the file using the <code>Media</code> parameter.</p>
29/// <p>Job queuing is available for Call Analytics jobs. If you pass a <code>DataAccessRoleArn</code> in your request and you exceed your Concurrent Job Limit, your job will automatically be added to a queue to be processed once your concurrent job count is below the limit.</p>
30/// <p>You must include the following parameters in your <code>StartCallAnalyticsJob</code> request:</p>
31/// <ul>
32/// <li>
33/// <p><code>region</code>: The Amazon Web Services Region where you are making your request. For a list of Amazon Web Services Regions supported with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/general/latest/gr/transcribe.html">Amazon Transcribe endpoints and quotas</a>.</p></li>
34/// <li>
35/// <p><code>CallAnalyticsJobName</code>: A custom name that you create for your transcription job that's unique within your Amazon Web Services account.</p></li>
36/// <li>
37/// <p><code>Media</code> (<code>MediaFileUri</code> or <code>RedactedMediaFileUri</code>): The Amazon S3 location of your media file.</p></li>
38/// </ul><note>
39/// <p>With Call Analytics, you can redact the audio contained in your media file by including <code>RedactedMediaFileUri</code>, instead of <code>MediaFileUri</code>, to specify the location of your input audio. If you choose to redact your audio, you can find your redacted media at the location specified in the <code>RedactedMediaFileUri</code> field of your response.</p>
40/// </note>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct StartCallAnalyticsJobFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::start_call_analytics_job::builders::StartCallAnalyticsJobInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48 crate::client::customize::internal::CustomizableSend<
49 crate::operation::start_call_analytics_job::StartCallAnalyticsJobOutput,
50 crate::operation::start_call_analytics_job::StartCallAnalyticsJobError,
51 > for StartCallAnalyticsJobFluentBuilder
52{
53 fn send(
54 self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57 crate::client::customize::internal::SendResult<
58 crate::operation::start_call_analytics_job::StartCallAnalyticsJobOutput,
59 crate::operation::start_call_analytics_job::StartCallAnalyticsJobError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl StartCallAnalyticsJobFluentBuilder {
66 /// Creates a new `StartCallAnalyticsJobFluentBuilder`.
67 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68 Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74 /// Access the StartCallAnalyticsJob as a reference.
75 pub fn as_input(&self) -> &crate::operation::start_call_analytics_job::builders::StartCallAnalyticsJobInputBuilder {
76 &self.inner
77 }
78 /// Sends the request and returns the response.
79 ///
80 /// If an error occurs, an `SdkError` will be returned with additional details that
81 /// can be matched against.
82 ///
83 /// By default, any retryable failures will be retried twice. Retry behavior
84 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85 /// set when configuring the client.
86 pub async fn send(
87 self,
88 ) -> ::std::result::Result<
89 crate::operation::start_call_analytics_job::StartCallAnalyticsJobOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91 crate::operation::start_call_analytics_job::StartCallAnalyticsJobError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95 let input = self
96 .inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99 let runtime_plugins = crate::operation::start_call_analytics_job::StartCallAnalyticsJob::operation_runtime_plugins(
100 self.handle.runtime_plugins.clone(),
101 &self.handle.conf,
102 self.config_override,
103 );
104 crate::operation::start_call_analytics_job::StartCallAnalyticsJob::orchestrate(&runtime_plugins, input).await
105 }
106
107 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
108 pub fn customize(
109 self,
110 ) -> crate::client::customize::CustomizableOperation<
111 crate::operation::start_call_analytics_job::StartCallAnalyticsJobOutput,
112 crate::operation::start_call_analytics_job::StartCallAnalyticsJobError,
113 Self,
114 > {
115 crate::client::customize::CustomizableOperation::new(self)
116 }
117 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
118 self.set_config_override(::std::option::Option::Some(config_override.into()));
119 self
120 }
121
122 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
123 self.config_override = config_override;
124 self
125 }
126 /// <p>A unique name, chosen by you, for your Call Analytics job.</p>
127 /// <p>This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If you try to create a new job with the same name as an existing job, you get a <code>ConflictException</code> error.</p>
128 pub fn call_analytics_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.call_analytics_job_name(input.into());
130 self
131 }
132 /// <p>A unique name, chosen by you, for your Call Analytics job.</p>
133 /// <p>This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If you try to create a new job with the same name as an existing job, you get a <code>ConflictException</code> error.</p>
134 pub fn set_call_analytics_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_call_analytics_job_name(input);
136 self
137 }
138 /// <p>A unique name, chosen by you, for your Call Analytics job.</p>
139 /// <p>This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If you try to create a new job with the same name as an existing job, you get a <code>ConflictException</code> error.</p>
140 pub fn get_call_analytics_job_name(&self) -> &::std::option::Option<::std::string::String> {
141 self.inner.get_call_analytics_job_name()
142 }
143 /// <p>Describes the Amazon S3 location of the media file you want to use in your Call Analytics request.</p>
144 pub fn media(mut self, input: crate::types::Media) -> Self {
145 self.inner = self.inner.media(input);
146 self
147 }
148 /// <p>Describes the Amazon S3 location of the media file you want to use in your Call Analytics request.</p>
149 pub fn set_media(mut self, input: ::std::option::Option<crate::types::Media>) -> Self {
150 self.inner = self.inner.set_media(input);
151 self
152 }
153 /// <p>Describes the Amazon S3 location of the media file you want to use in your Call Analytics request.</p>
154 pub fn get_media(&self) -> &::std::option::Option<crate::types::Media> {
155 self.inner.get_media()
156 }
157 /// <p>The Amazon S3 location where you want your Call Analytics transcription output stored. You can use any of the following formats to specify the output location:</p>
158 /// <ol>
159 /// <li>
160 /// <p>s3://DOC-EXAMPLE-BUCKET</p></li>
161 /// <li>
162 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/</p></li>
163 /// <li>
164 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json</p></li>
165 /// </ol>
166 /// <p>Unless you specify a file name (option 3), the name of your output file has a default value that matches the name you specified for your transcription job using the <code>CallAnalyticsJobName</code> parameter.</p>
167 /// <p>You can specify a KMS key to encrypt your output using the <code>OutputEncryptionKMSKeyId</code> parameter. If you do not specify a KMS key, Amazon Transcribe uses the default Amazon S3 key for server-side encryption.</p>
168 /// <p>If you do not specify <code>OutputLocation</code>, your transcript is placed in a service-managed Amazon S3 bucket and you are provided with a URI to access your transcript.</p>
169 pub fn output_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.inner = self.inner.output_location(input.into());
171 self
172 }
173 /// <p>The Amazon S3 location where you want your Call Analytics transcription output stored. You can use any of the following formats to specify the output location:</p>
174 /// <ol>
175 /// <li>
176 /// <p>s3://DOC-EXAMPLE-BUCKET</p></li>
177 /// <li>
178 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/</p></li>
179 /// <li>
180 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json</p></li>
181 /// </ol>
182 /// <p>Unless you specify a file name (option 3), the name of your output file has a default value that matches the name you specified for your transcription job using the <code>CallAnalyticsJobName</code> parameter.</p>
183 /// <p>You can specify a KMS key to encrypt your output using the <code>OutputEncryptionKMSKeyId</code> parameter. If you do not specify a KMS key, Amazon Transcribe uses the default Amazon S3 key for server-side encryption.</p>
184 /// <p>If you do not specify <code>OutputLocation</code>, your transcript is placed in a service-managed Amazon S3 bucket and you are provided with a URI to access your transcript.</p>
185 pub fn set_output_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_output_location(input);
187 self
188 }
189 /// <p>The Amazon S3 location where you want your Call Analytics transcription output stored. You can use any of the following formats to specify the output location:</p>
190 /// <ol>
191 /// <li>
192 /// <p>s3://DOC-EXAMPLE-BUCKET</p></li>
193 /// <li>
194 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/</p></li>
195 /// <li>
196 /// <p>s3://DOC-EXAMPLE-BUCKET/my-output-folder/my-call-analytics-job.json</p></li>
197 /// </ol>
198 /// <p>Unless you specify a file name (option 3), the name of your output file has a default value that matches the name you specified for your transcription job using the <code>CallAnalyticsJobName</code> parameter.</p>
199 /// <p>You can specify a KMS key to encrypt your output using the <code>OutputEncryptionKMSKeyId</code> parameter. If you do not specify a KMS key, Amazon Transcribe uses the default Amazon S3 key for server-side encryption.</p>
200 /// <p>If you do not specify <code>OutputLocation</code>, your transcript is placed in a service-managed Amazon S3 bucket and you are provided with a URI to access your transcript.</p>
201 pub fn get_output_location(&self) -> &::std::option::Option<::std::string::String> {
202 self.inner.get_output_location()
203 }
204 /// <p>The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your Call Analytics output.</p>
205 /// <p>KMS key ARNs have the format <code>arn:partition:kms:region:account:key/key-id</code>. For example: <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN"> KMS key ARNs</a>.</p>
206 /// <p>If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).</p>
207 /// <p>Note that the role making the request and the role specified in the <code>DataAccessRoleArn</code> request parameter (if present) must have permission to use the specified KMS key.</p>
208 pub fn output_encryption_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209 self.inner = self.inner.output_encryption_kms_key_id(input.into());
210 self
211 }
212 /// <p>The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your Call Analytics output.</p>
213 /// <p>KMS key ARNs have the format <code>arn:partition:kms:region:account:key/key-id</code>. For example: <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN"> KMS key ARNs</a>.</p>
214 /// <p>If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).</p>
215 /// <p>Note that the role making the request and the role specified in the <code>DataAccessRoleArn</code> request parameter (if present) must have permission to use the specified KMS key.</p>
216 pub fn set_output_encryption_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.inner = self.inner.set_output_encryption_kms_key_id(input);
218 self
219 }
220 /// <p>The Amazon Resource Name (ARN) of a KMS key that you want to use to encrypt your Call Analytics output.</p>
221 /// <p>KMS key ARNs have the format <code>arn:partition:kms:region:account:key/key-id</code>. For example: <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN"> KMS key ARNs</a>.</p>
222 /// <p>If you do not specify an encryption key, your output is encrypted with the default Amazon S3 key (SSE-S3).</p>
223 /// <p>Note that the role making the request and the role specified in the <code>DataAccessRoleArn</code> request parameter (if present) must have permission to use the specified KMS key.</p>
224 pub fn get_output_encryption_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
225 self.inner.get_output_encryption_kms_key_id()
226 }
227 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files. If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.</p>
228 /// <p>IAM role ARNs have the format <code>arn:partition:iam::account:role/role-name-with-path</code>. For example: <code>arn:aws:iam::111122223333:role/Admin</code>.</p>
229 /// <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns">IAM ARNs</a>.</p>
230 pub fn data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.inner = self.inner.data_access_role_arn(input.into());
232 self
233 }
234 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files. If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.</p>
235 /// <p>IAM role ARNs have the format <code>arn:partition:iam::account:role/role-name-with-path</code>. For example: <code>arn:aws:iam::111122223333:role/Admin</code>.</p>
236 /// <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns">IAM ARNs</a>.</p>
237 pub fn set_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238 self.inner = self.inner.set_data_access_role_arn(input);
239 self
240 }
241 /// <p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files. If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.</p>
242 /// <p>IAM role ARNs have the format <code>arn:partition:iam::account:role/role-name-with-path</code>. For example: <code>arn:aws:iam::111122223333:role/Admin</code>.</p>
243 /// <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns">IAM ARNs</a>.</p>
244 pub fn get_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
245 self.inner.get_data_access_role_arn()
246 }
247 /// <p>Specify additional optional settings in your request, including content redaction; allows you to apply custom language models, vocabulary filters, and custom vocabularies to your Call Analytics job.</p>
248 pub fn settings(mut self, input: crate::types::CallAnalyticsJobSettings) -> Self {
249 self.inner = self.inner.settings(input);
250 self
251 }
252 /// <p>Specify additional optional settings in your request, including content redaction; allows you to apply custom language models, vocabulary filters, and custom vocabularies to your Call Analytics job.</p>
253 pub fn set_settings(mut self, input: ::std::option::Option<crate::types::CallAnalyticsJobSettings>) -> Self {
254 self.inner = self.inner.set_settings(input);
255 self
256 }
257 /// <p>Specify additional optional settings in your request, including content redaction; allows you to apply custom language models, vocabulary filters, and custom vocabularies to your Call Analytics job.</p>
258 pub fn get_settings(&self) -> &::std::option::Option<crate::types::CallAnalyticsJobSettings> {
259 self.inner.get_settings()
260 }
261 ///
262 /// Appends an item to `Tags`.
263 ///
264 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
265 ///
266 /// <p>Adds one or more custom tags, each in the form of a key:value pair, to a new call analytics job at the time you start this new job.</p>
267 /// <p>To learn more about using tags with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tagging.html">Tagging resources</a>.</p>
268 pub fn tags(mut self, input: crate::types::Tag) -> Self {
269 self.inner = self.inner.tags(input);
270 self
271 }
272 /// <p>Adds one or more custom tags, each in the form of a key:value pair, to a new call analytics job at the time you start this new job.</p>
273 /// <p>To learn more about using tags with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tagging.html">Tagging resources</a>.</p>
274 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
275 self.inner = self.inner.set_tags(input);
276 self
277 }
278 /// <p>Adds one or more custom tags, each in the form of a key:value pair, to a new call analytics job at the time you start this new job.</p>
279 /// <p>To learn more about using tags with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tagging.html">Tagging resources</a>.</p>
280 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
281 self.inner.get_tags()
282 }
283 ///
284 /// Appends an item to `ChannelDefinitions`.
285 ///
286 /// To override the contents of this collection use [`set_channel_definitions`](Self::set_channel_definitions).
287 ///
288 /// <p>Makes it possible to specify which speaker is on which channel. For example, if your agent is the first participant to speak, you would set <code>ChannelId</code> to <code>0</code> (to indicate the first channel) and <code>ParticipantRole</code> to <code>AGENT</code> (to indicate that it's the agent speaking).</p>
289 pub fn channel_definitions(mut self, input: crate::types::ChannelDefinition) -> Self {
290 self.inner = self.inner.channel_definitions(input);
291 self
292 }
293 /// <p>Makes it possible to specify which speaker is on which channel. For example, if your agent is the first participant to speak, you would set <code>ChannelId</code> to <code>0</code> (to indicate the first channel) and <code>ParticipantRole</code> to <code>AGENT</code> (to indicate that it's the agent speaking).</p>
294 pub fn set_channel_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ChannelDefinition>>) -> Self {
295 self.inner = self.inner.set_channel_definitions(input);
296 self
297 }
298 /// <p>Makes it possible to specify which speaker is on which channel. For example, if your agent is the first participant to speak, you would set <code>ChannelId</code> to <code>0</code> (to indicate the first channel) and <code>ParticipantRole</code> to <code>AGENT</code> (to indicate that it's the agent speaking).</p>
299 pub fn get_channel_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ChannelDefinition>> {
300 self.inner.get_channel_definitions()
301 }
302}