pub struct Builder { /* private fields */ }
Expand description

A builder for CreateIntentInput.

Implementations§

The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.

Examples found in repository?
src/client.rs (line 2301)
2300
2301
2302
2303
        pub fn intent_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.intent_name(input.into());
            self
        }

The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.

Examples found in repository?
src/client.rs (line 2306)
2305
2306
2307
2308
        pub fn set_intent_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_intent_name(input);
            self
        }

A description of the intent. Use the description to help identify the intent in lists.

Examples found in repository?
src/client.rs (line 2311)
2310
2311
2312
2313
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.description(input.into());
            self
        }

A description of the intent. Use the description to help identify the intent in lists.

Examples found in repository?
src/client.rs (line 2316)
2315
2316
2317
2318
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_description(input);
            self
        }

A unique identifier for the built-in intent to base this intent on.

Examples found in repository?
src/client.rs (line 2321)
2320
2321
2322
2323
        pub fn parent_intent_signature(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.parent_intent_signature(input.into());
            self
        }

A unique identifier for the built-in intent to base this intent on.

Examples found in repository?
src/client.rs (line 2329)
2325
2326
2327
2328
2329
2330
2331
        pub fn set_parent_intent_signature(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_parent_intent_signature(input);
            self
        }

Appends an item to sample_utterances.

To override the contents of this collection use set_sample_utterances.

An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".

In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..

Examples found in repository?
src/client.rs (line 2339)
2338
2339
2340
2341
        pub fn sample_utterances(mut self, input: crate::model::SampleUtterance) -> Self {
            self.inner = self.inner.sample_utterances(input);
            self
        }

An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".

In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..

Examples found in repository?
src/client.rs (line 2348)
2344
2345
2346
2347
2348
2349
2350
        pub fn set_sample_utterances(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SampleUtterance>>,
        ) -> Self {
            self.inner = self.inner.set_sample_utterances(input);
            self
        }

Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.

For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant to true. You might find John's phone number and set the corresponding session attribute.

Examples found in repository?
src/client.rs (line 2354)
2353
2354
2355
2356
        pub fn dialog_code_hook(mut self, input: crate::model::DialogCodeHookSettings) -> Self {
            self.inner = self.inner.dialog_code_hook(input);
            self
        }

Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction.

For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant to true. You might find John's phone number and set the corresponding session attribute.

Examples found in repository?
src/client.rs (line 2363)
2359
2360
2361
2362
2363
2364
2365
        pub fn set_dialog_code_hook(
            mut self,
            input: std::option::Option<crate::model::DialogCodeHookSettings>,
        ) -> Self {
            self.inner = self.inner.set_dialog_code_hook(input);
            self
        }

Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.

For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.

Examples found in repository?
src/client.rs (line 2372)
2368
2369
2370
2371
2372
2373
2374
        pub fn fulfillment_code_hook(
            mut self,
            input: crate::model::FulfillmentCodeHookSettings,
        ) -> Self {
            self.inner = self.inner.fulfillment_code_hook(input);
            self
        }

Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user.

For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.

Examples found in repository?
src/client.rs (line 2381)
2377
2378
2379
2380
2381
2382
2383
        pub fn set_fulfillment_code_hook(
            mut self,
            input: std::option::Option<crate::model::FulfillmentCodeHookSettings>,
        ) -> Self {
            self.inner = self.inner.set_fulfillment_code_hook(input);
            self
        }

Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.

Examples found in repository?
src/client.rs (line 2389)
2385
2386
2387
2388
2389
2390
2391
        pub fn intent_confirmation_setting(
            mut self,
            input: crate::model::IntentConfirmationSetting,
        ) -> Self {
            self.inner = self.inner.intent_confirmation_setting(input);
            self
        }

Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.

Examples found in repository?
src/client.rs (line 2397)
2393
2394
2395
2396
2397
2398
2399
        pub fn set_intent_confirmation_setting(
            mut self,
            input: std::option::Option<crate::model::IntentConfirmationSetting>,
        ) -> Self {
            self.inner = self.inner.set_intent_confirmation_setting(input);
            self
        }

Sets the response that Amazon Lex sends to the user when the intent is closed.

Examples found in repository?
src/client.rs (line 2402)
2401
2402
2403
2404
        pub fn intent_closing_setting(mut self, input: crate::model::IntentClosingSetting) -> Self {
            self.inner = self.inner.intent_closing_setting(input);
            self
        }

Sets the response that Amazon Lex sends to the user when the intent is closed.

Examples found in repository?
src/client.rs (line 2410)
2406
2407
2408
2409
2410
2411
2412
        pub fn set_intent_closing_setting(
            mut self,
            input: std::option::Option<crate::model::IntentClosingSetting>,
        ) -> Self {
            self.inner = self.inner.set_intent_closing_setting(input);
            self
        }

Appends an item to input_contexts.

To override the contents of this collection use set_input_contexts.

A list of contexts that must be active for this intent to be considered by Amazon Lex.

When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.

A context can be automatically activated using the outputContexts property or it can be set at runtime.

For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.

An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.

Examples found in repository?
src/client.rs (line 2423)
2422
2423
2424
2425
        pub fn input_contexts(mut self, input: crate::model::InputContext) -> Self {
            self.inner = self.inner.input_contexts(input);
            self
        }

A list of contexts that must be active for this intent to be considered by Amazon Lex.

When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent.

A context can be automatically activated using the outputContexts property or it can be set at runtime.

For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond.

An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.

Examples found in repository?
src/client.rs (line 2435)
2431
2432
2433
2434
2435
2436
2437
        pub fn set_input_contexts(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InputContext>>,
        ) -> Self {
            self.inner = self.inner.set_input_contexts(input);
            self
        }

Appends an item to output_contexts.

To override the contents of this collection use set_output_contexts.

A lists of contexts that the intent activates when it is fulfilled.

You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.

When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.

Examples found in repository?
src/client.rs (line 2446)
2445
2446
2447
2448
        pub fn output_contexts(mut self, input: crate::model::OutputContext) -> Self {
            self.inner = self.inner.output_contexts(input);
            self
        }

A lists of contexts that the intent activates when it is fulfilled.

You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.

When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.

Examples found in repository?
src/client.rs (line 2456)
2452
2453
2454
2455
2456
2457
2458
        pub fn set_output_contexts(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::OutputContext>>,
        ) -> Self {
            self.inner = self.inner.set_output_contexts(input);
            self
        }

Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke.

Examples found in repository?
src/client.rs (line 2461)
2460
2461
2462
2463
        pub fn kendra_configuration(mut self, input: crate::model::KendraConfiguration) -> Self {
            self.inner = self.inner.kendra_configuration(input);
            self
        }

Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke.

Examples found in repository?
src/client.rs (line 2469)
2465
2466
2467
2468
2469
2470
2471
        pub fn set_kendra_configuration(
            mut self,
            input: std::option::Option<crate::model::KendraConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_kendra_configuration(input);
            self
        }

The identifier of the bot associated with this intent.

Examples found in repository?
src/client.rs (line 2474)
2473
2474
2475
2476
        pub fn bot_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.bot_id(input.into());
            self
        }

The identifier of the bot associated with this intent.

Examples found in repository?
src/client.rs (line 2479)
2478
2479
2480
2481
        pub fn set_bot_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_bot_id(input);
            self
        }

The identifier of the version of the bot associated with this intent.

Examples found in repository?
src/client.rs (line 2484)
2483
2484
2485
2486
        pub fn bot_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.bot_version(input.into());
            self
        }

The identifier of the version of the bot associated with this intent.

Examples found in repository?
src/client.rs (line 2489)
2488
2489
2490
2491
        pub fn set_bot_version(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_bot_version(input);
            self
        }

The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see Supported languages.

Examples found in repository?
src/client.rs (line 2494)
2493
2494
2495
2496
        pub fn locale_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.locale_id(input.into());
            self
        }

The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see Supported languages.

Examples found in repository?
src/client.rs (line 2499)
2498
2499
2500
2501
        pub fn set_locale_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_locale_id(input);
            self
        }

Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.

Examples found in repository?
src/client.rs (line 2507)
2503
2504
2505
2506
2507
2508
2509
        pub fn initial_response_setting(
            mut self,
            input: crate::model::InitialResponseSetting,
        ) -> Self {
            self.inner = self.inner.initial_response_setting(input);
            self
        }

Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.

Examples found in repository?
src/client.rs (line 2515)
2511
2512
2513
2514
2515
2516
2517
        pub fn set_initial_response_setting(
            mut self,
            input: std::option::Option<crate::model::InitialResponseSetting>,
        ) -> Self {
            self.inner = self.inner.set_initial_response_setting(input);
            self
        }

Consumes the builder and constructs a CreateIntentInput.

Examples found in repository?
src/client.rs (line 2268)
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateIntent,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateIntentError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateIntentOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateIntentError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more