Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for Amazon Lex Model Building Service

Client for invoking operations on Amazon Lex Model Building Service. Each operation on Amazon Lex Model Building Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_lexmodelbuilding::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Builder struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_lexmodelbuilding::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CreateBotVersion operation has a Client::create_bot_version, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.create_bot_version()
    .name("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

Source§

impl Client

Source

pub fn create_bot_version(&self) -> CreateBotVersionFluentBuilder

Constructs a fluent builder for the CreateBotVersion operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      The name of the bot that you want to create a new version of. The name is case sensitive.


    • checksum(impl Into<String>) / set_checksum(Option<String>):
      required: false

      Identifies a specific revision of the $LATEST version of the bot. If you specify a checksum and the $LATEST version of the bot has a different checksum, a PreconditionFailedException exception is returned and Amazon Lex doesn’t publish a new version. If you don’t specify a checksum, Amazon Lex publishes the $LATEST version.


  • On success, responds with CreateBotVersionOutput with field(s):
    • name(Option<String>):

      The name of the bot.

    • description(Option<String>):

      A description of the bot.

    • intents(Option<Vec::<Intent>>):

      An array of Intent objects. For more information, see PutBot.

    • clarification_prompt(Option<Prompt>):

      The message that Amazon Lex uses when it doesn’t understand the user’s request. For more information, see PutBot.

    • abort_statement(Option<Statement>):

      The message that Amazon Lex uses to cancel a conversation. For more information, see PutBot.

    • status(Option<Status>):

      When you send a request to create or update a bot, Amazon Lex sets the status response element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can’t build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the failureReason response element.

    • failure_reason(Option<String>):

      If status is FAILED, Amazon Lex provides the reason that it failed to build the bot.

    • last_updated_date(Option<DateTime>):

      The date when the $LATEST version of this bot was updated.

    • created_date(Option<DateTime>):

      The date when the bot version was created.

    • idle_session_ttl_in_seconds(Option<i32>):

      The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.

    • voice_id(Option<String>):

      The Amazon Polly voice ID that Amazon Lex uses for voice interactions with the user.

    • checksum(Option<String>):

      Checksum identifying the version of the bot that was created.

    • version(Option<String>):

      The version of the bot.

    • locale(Option<Locale>):

      Specifies the target locale for the bot.

    • child_directed(Option<bool>):

      For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children’s Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.

      If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.

    • enable_model_improvements(Option<bool>):

      Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.

    • detect_sentiment(Option<bool>):

      Indicates whether utterances entered by the user should be sent to Amazon Comprehend for sentiment analysis.

  • On failure, responds with SdkError<CreateBotVersionError>
Source§

impl Client

Source

pub fn create_intent_version(&self) -> CreateIntentVersionFluentBuilder

Constructs a fluent builder for the CreateIntentVersion operation.

Source§

impl Client

Source

pub fn create_slot_type_version(&self) -> CreateSlotTypeVersionFluentBuilder

Constructs a fluent builder for the CreateSlotTypeVersion operation.

Source§

impl Client

Source

pub fn delete_bot(&self) -> DeleteBotFluentBuilder

Constructs a fluent builder for the DeleteBot operation.

Source§

impl Client

Source

pub fn delete_bot_alias(&self) -> DeleteBotAliasFluentBuilder

Constructs a fluent builder for the DeleteBotAlias operation.

Source§

impl Client

Source

pub fn delete_bot_channel_association( &self, ) -> DeleteBotChannelAssociationFluentBuilder

Constructs a fluent builder for the DeleteBotChannelAssociation operation.

Source§

impl Client

Source

pub fn delete_bot_version(&self) -> DeleteBotVersionFluentBuilder

Constructs a fluent builder for the DeleteBotVersion operation.

Source§

impl Client

Source

pub fn delete_intent(&self) -> DeleteIntentFluentBuilder

Constructs a fluent builder for the DeleteIntent operation.

Source§

impl Client

Source

pub fn delete_intent_version(&self) -> DeleteIntentVersionFluentBuilder

Constructs a fluent builder for the DeleteIntentVersion operation.

Source§

impl Client

Source

pub fn delete_slot_type(&self) -> DeleteSlotTypeFluentBuilder

Constructs a fluent builder for the DeleteSlotType operation.

Source§

impl Client

Source

pub fn delete_slot_type_version(&self) -> DeleteSlotTypeVersionFluentBuilder

Constructs a fluent builder for the DeleteSlotTypeVersion operation.

Source§

impl Client

Source

pub fn delete_utterances(&self) -> DeleteUtterancesFluentBuilder

Constructs a fluent builder for the DeleteUtterances operation.

Source§

impl Client

Source

pub fn get_bot(&self) -> GetBotFluentBuilder

Constructs a fluent builder for the GetBot operation.

  • The fluent builder is configurable:
  • On success, responds with GetBotOutput with field(s):
    • name(Option<String>):

      The name of the bot.

    • description(Option<String>):

      A description of the bot.

    • intents(Option<Vec::<Intent>>):

      An array of intent objects. For more information, see PutBot.

    • enable_model_improvements(Option<bool>):

      Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.

    • nlu_intent_confidence_threshold(Option<f64>):

      The score that determines where Amazon Lex inserts the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent is inserted if the confidence score for all intents is below this value. AMAZON.KendraSearchIntent is only inserted if it is configured for the bot.

    • clarification_prompt(Option<Prompt>):

      The message Amazon Lex uses when it doesn’t understand the user’s request. For more information, see PutBot.

    • abort_statement(Option<Statement>):

      The message that Amazon Lex returns when the user elects to end the conversation without completing it. For more information, see PutBot.

    • status(Option<Status>):

      The status of the bot.

      When the status is BUILDING Amazon Lex is building the bot for testing and use.

      If the status of the bot is READY_BASIC_TESTING, you can test the bot using the exact utterances specified in the bot’s intents. When the bot is ready for full testing or to run, the status is READY.

      If there was a problem with building the bot, the status is FAILED and the failureReason field explains why the bot did not build.

      If the bot was saved but not built, the status is NOT_BUILT.

    • failure_reason(Option<String>):

      If status is FAILED, Amazon Lex explains why it failed to build the bot.

    • last_updated_date(Option<DateTime>):

      The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.

    • created_date(Option<DateTime>):

      The date that the bot was created.

    • idle_session_ttl_in_seconds(Option<i32>):

      The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.

    • voice_id(Option<String>):

      The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see PutBot.

    • checksum(Option<String>):

      Checksum of the bot used to identify a specific revision of the bot’s $LATEST version.

    • version(Option<String>):

      The version of the bot. For a new bot, the version is always $LATEST.

    • locale(Option<Locale>):

      The target locale for the bot.

    • child_directed(Option<bool>):

      For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children’s Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.

      If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.

    • detect_sentiment(Option<bool>):

      Indicates whether user utterances should be sent to Amazon Comprehend for sentiment analysis.

  • On failure, responds with SdkError<GetBotError>
Source§

impl Client

Source

pub fn get_bot_alias(&self) -> GetBotAliasFluentBuilder

Constructs a fluent builder for the GetBotAlias operation.

Source§

impl Client

Source

pub fn get_bot_aliases(&self) -> GetBotAliasesFluentBuilder

Constructs a fluent builder for the GetBotAliases operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_bot_channel_association( &self, ) -> GetBotChannelAssociationFluentBuilder

Constructs a fluent builder for the GetBotChannelAssociation operation.

Source§

impl Client

Source

pub fn get_bot_channel_associations( &self, ) -> GetBotChannelAssociationsFluentBuilder

Constructs a fluent builder for the GetBotChannelAssociations operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_bot_versions(&self) -> GetBotVersionsFluentBuilder

Constructs a fluent builder for the GetBotVersions operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_bots(&self) -> GetBotsFluentBuilder

Constructs a fluent builder for the GetBots operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_builtin_intent(&self) -> GetBuiltinIntentFluentBuilder

Constructs a fluent builder for the GetBuiltinIntent operation.

Source§

impl Client

Source

pub fn get_builtin_intents(&self) -> GetBuiltinIntentsFluentBuilder

Constructs a fluent builder for the GetBuiltinIntents operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_builtin_slot_types(&self) -> GetBuiltinSlotTypesFluentBuilder

Constructs a fluent builder for the GetBuiltinSlotTypes operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_export(&self) -> GetExportFluentBuilder

Constructs a fluent builder for the GetExport operation.

Source§

impl Client

Source

pub fn get_import(&self) -> GetImportFluentBuilder

Constructs a fluent builder for the GetImport operation.

Source§

impl Client

Source

pub fn get_intent(&self) -> GetIntentFluentBuilder

Constructs a fluent builder for the GetIntent operation.

Source§

impl Client

Source

pub fn get_intent_versions(&self) -> GetIntentVersionsFluentBuilder

Constructs a fluent builder for the GetIntentVersions operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_intents(&self) -> GetIntentsFluentBuilder

Constructs a fluent builder for the GetIntents operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_migration(&self) -> GetMigrationFluentBuilder

Constructs a fluent builder for the GetMigration operation.

Source§

impl Client

Source

pub fn get_migrations(&self) -> GetMigrationsFluentBuilder

Constructs a fluent builder for the GetMigrations operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_slot_type(&self) -> GetSlotTypeFluentBuilder

Constructs a fluent builder for the GetSlotType operation.

Source§

impl Client

Source

pub fn get_slot_type_versions(&self) -> GetSlotTypeVersionsFluentBuilder

Constructs a fluent builder for the GetSlotTypeVersions operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_slot_types(&self) -> GetSlotTypesFluentBuilder

Constructs a fluent builder for the GetSlotTypes operation. This operation supports pagination; See into_paginator().

Source§

impl Client

Source

pub fn get_utterances_view(&self) -> GetUtterancesViewFluentBuilder

Constructs a fluent builder for the GetUtterancesView operation.

Source§

impl Client

Source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation.

Source§

impl Client

Source

pub fn put_bot(&self) -> PutBotFluentBuilder

Constructs a fluent builder for the PutBot operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      The name of the bot. The name is not case sensitive.


    • description(impl Into<String>) / set_description(Option<String>):
      required: false

      A description of the bot.


    • intents(Intent) / set_intents(Option<Vec::<Intent>>):
      required: false

      An array of Intent objects. Each intent represents a command that a user can express. For example, a pizza ordering bot might support an OrderPizza intent. For more information, see how-it-works.


    • enable_model_improvements(bool) / set_enable_model_improvements(Option<bool>):
      required: false

      Set to true to enable access to natural language understanding improvements.

      When you set the enableModelImprovements parameter to true you can use the nluIntentConfidenceThreshold parameter to configure confidence scores. For more information, see Confidence Scores.

      You can only set the enableModelImprovements parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements.

      The Regions where you can set the enableModelImprovements parameter to true are:

      • US East (N. Virginia) (us-east-1)

      • US West (Oregon) (us-west-2)

      • Asia Pacific (Sydney) (ap-southeast-2)

      • EU (Ireland) (eu-west-1)

      In other Regions, the enableModelImprovements parameter is set to true by default. In these Regions setting the parameter to false throws a ValidationException exception.


    • nlu_intent_confidence_threshold(f64) / set_nlu_intent_confidence_threshold(Option<f64>):
      required: false

      Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.

      You must set the enableModelImprovements parameter to true to use confidence scores in the following regions.

      • US East (N. Virginia) (us-east-1)

      • US West (Oregon) (us-west-2)

      • Asia Pacific (Sydney) (ap-southeast-2)

      • EU (Ireland) (eu-west-1)

      In other Regions, the enableModelImprovements parameter is set to true by default.

      For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:

      • AMAZON.FallbackIntent

      • IntentA

      • IntentB

      • IntentC


    • clarification_prompt(Prompt) / set_clarification_prompt(Option<Prompt>):
      required: false

      When Amazon Lex doesn’t understand the user’s intent, it uses this message to get clarification. To specify how many times Amazon Lex should repeat the clarification prompt, use the maxAttempts field. If Amazon Lex still doesn’t understand, it sends the message in the abortStatement field.

      When you create a clarification prompt, make sure that it suggests the correct response from the user. for example, for a bot that orders pizza and drinks, you might create this clarification prompt: “What would you like to do? You can say ‘Order a pizza’ or ‘Order a drink.’”

      If you have defined a fallback intent, it will be invoked if the clarification prompt is repeated the number of times defined in the maxAttempts field. For more information, see AMAZON.FallbackIntent.

      If you don’t define a clarification prompt, at runtime Amazon Lex will return a 400 Bad Request exception in three cases:

      • Follow-up prompt - When the user responds to a follow-up prompt but does not provide an intent. For example, in response to a follow-up prompt that says “Would you like anything else today?” the user says “Yes.” Amazon Lex will return a 400 Bad Request exception because it does not have a clarification prompt to send to the user to get an intent.

      • Lambda function - When using a Lambda function, you return an ElicitIntent dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.

      • PutSession operation - When using the PutSession operation, you send an ElicitIntent dialog type. Since Amazon Lex does not have a clarification prompt to get an intent from the user, it returns a 400 Bad Request exception.


    • abort_statement(Statement) / set_abort_statement(Option<Statement>):
      required: false

      When Amazon Lex can’t understand the user’s input in context, it tries to elicit the information a few times. After that, Amazon Lex sends the message defined in abortStatement to the user, and then cancels the conversation. To set the number of retries, use the valueElicitationPrompt field for the slot type.

      For example, in a pizza ordering bot, Amazon Lex might ask a user “What type of crust would you like?” If the user’s response is not one of the expected responses (for example, “thin crust, “deep dish,” etc.), Amazon Lex tries to elicit a correct response a few more times.

      For example, in a pizza ordering application, OrderPizza might be one of the intents. This intent might require the CrustType slot. You specify the valueElicitationPrompt field when you create the CrustType slot.

      If you have defined a fallback intent the cancel statement will not be sent to the user, the fallback intent is used instead. For more information, see AMAZON.FallbackIntent.


    • idle_session_ttl_in_seconds(i32) / set_idle_session_ttl_in_seconds(Option<i32>):
      required: false

      The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.

      A user interaction session remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

      For example, suppose that a user chooses the OrderPizza intent, but gets sidetracked halfway through placing an order. If the user doesn’t complete the order within the specified time, Amazon Lex discards the slot information that it gathered, and the user must start over.

      If you don’t include the idleSessionTTLInSeconds element in a PutBot operation request, Amazon Lex uses the default value. This is also true if the request replaces an existing bot.

      The default is 300 seconds (5 minutes).


    • voice_id(impl Into<String>) / set_voice_id(Option<String>):
      required: false

      The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see Voices in Amazon Polly in the Amazon Polly Developer Guide.


    • checksum(impl Into<String>) / set_checksum(Option<String>):
      required: false

      Identifies a specific revision of the $LATEST version.

      When you create a new bot, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.

      When you want to update a bot, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don’t specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.


    • process_behavior(ProcessBehavior) / set_process_behavior(Option<ProcessBehavior>):
      required: false

      If you set the processBehavior element to BUILD, Amazon Lex builds the bot so that it can be run. If you set the element to SAVE Amazon Lex saves the bot, but doesn’t build it.

      If you don’t specify this value, the default value is BUILD.


    • locale(Locale) / set_locale(Option<Locale>):
      required: true

      Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.

      The default is en-US.


    • child_directed(bool) / set_child_directed(Option<bool>):
      required: true

      For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children’s Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.

      If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.


    • detect_sentiment(bool) / set_detect_sentiment(Option<bool>):
      required: false

      When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don’t specify detectSentiment, the default is false.


    • create_version(bool) / set_create_version(Option<bool>):
      required: false

      When set to true a new numbered version of the bot is created. This is the same as calling the CreateBotVersion operation. If you don’t specify createVersion, the default is false.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      A list of tags to add to the bot. You can only add tags when you create a bot, you can’t use the PutBot operation to update the tags on a bot. To update tags, use the TagResource operation.


  • On success, responds with PutBotOutput with field(s):
    • name(Option<String>):

      The name of the bot.

    • description(Option<String>):

      A description of the bot.

    • intents(Option<Vec::<Intent>>):

      An array of Intent objects. For more information, see PutBot.

    • enable_model_improvements(Option<bool>):

      Indicates whether the bot uses accuracy improvements. true indicates that the bot is using the improvements, otherwise, false.

    • nlu_intent_confidence_threshold(Option<f64>):

      The score that determines where Amazon Lex inserts the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent is inserted if the confidence score for all intents is below this value. AMAZON.KendraSearchIntent is only inserted if it is configured for the bot.

    • clarification_prompt(Option<Prompt>):

      The prompts that Amazon Lex uses when it doesn’t understand the user’s intent. For more information, see PutBot.

    • abort_statement(Option<Statement>):

      The message that Amazon Lex uses to cancel a conversation. For more information, see PutBot.

    • status(Option<Status>):

      When you send a request to create a bot with processBehavior set to BUILD, Amazon Lex sets the status response element to BUILDING.

      In the READY_BASIC_TESTING state you can test the bot with user inputs that exactly match the utterances configured for the bot’s intents and values in the slot types.

      If Amazon Lex can’t build the bot, Amazon Lex sets status to FAILED. Amazon Lex returns the reason for the failure in the failureReason response element.

      When you set processBehavior to SAVE, Amazon Lex sets the status code to NOT BUILT.

      When the bot is in the READY state you can test and publish the bot.

    • failure_reason(Option<String>):

      If status is FAILED, Amazon Lex provides the reason that it failed to build the bot.

    • last_updated_date(Option<DateTime>):

      The date that the bot was updated. When you create a resource, the creation date and last updated date are the same.

    • created_date(Option<DateTime>):

      The date that the bot was created.

    • idle_session_ttl_in_seconds(Option<i32>):

      The maximum length of time that Amazon Lex retains the data gathered in a conversation. For more information, see PutBot.

    • voice_id(Option<String>):

      The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. For more information, see PutBot.

    • checksum(Option<String>):

      Checksum of the bot that you created.

    • version(Option<String>):

      The version of the bot. For a new bot, the version is always $LATEST.

    • locale(Option<Locale>):

      The target locale for the bot.

    • child_directed(Option<bool>):

      For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children’s Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA.

      If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.

    • create_version(Option<bool>):

      True if a new version of the bot was created. If the createVersion field was not specified in the request, the createVersion field is set to false in the response.

    • detect_sentiment(Option<bool>):

      true if the bot is configured to send user utterances to Amazon Comprehend for sentiment analysis. If the detectSentiment field was not specified in the request, the detectSentiment field is false in the response.

    • tags(Option<Vec::<Tag>>):

      A list of tags associated with the bot.

  • On failure, responds with SdkError<PutBotError>
Source§

impl Client

Source

pub fn put_bot_alias(&self) -> PutBotAliasFluentBuilder

Constructs a fluent builder for the PutBotAlias operation.

Source§

impl Client

Source

pub fn put_intent(&self) -> PutIntentFluentBuilder

Constructs a fluent builder for the PutIntent operation.

Source§

impl Client

Source

pub fn put_slot_type(&self) -> PutSlotTypeFluentBuilder

Constructs a fluent builder for the PutSlotType operation.

Source§

impl Client

Source

pub fn start_import(&self) -> StartImportFluentBuilder

Constructs a fluent builder for the StartImport operation.

Source§

impl Client

Source

pub fn start_migration(&self) -> StartMigrationFluentBuilder

Constructs a fluent builder for the StartMigration operation.

Source§

impl Client

Source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

Source§

impl Client

Source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

Source§

impl Client

Source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

Source

pub fn config(&self) -> &Config

Returns the client’s configuration.

Source§

impl Client

Source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,