/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace LexModelsV2 { namespace Model { /** *

Contains settings used by Amazon Lex to select a slot value.

See * Also:

AWS * API Reference

*/ class SlotValueSelectionSetting { public: AWS_LEXMODELSV2_API SlotValueSelectionSetting(); AWS_LEXMODELSV2_API SlotValueSelectionSetting(Aws::Utils::Json::JsonView jsonValue); AWS_LEXMODELSV2_API SlotValueSelectionSetting& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LEXMODELSV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline const SlotValueResolutionStrategy& GetResolutionStrategy() const{ return m_resolutionStrategy; } /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline bool ResolutionStrategyHasBeenSet() const { return m_resolutionStrategyHasBeenSet; } /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline void SetResolutionStrategy(const SlotValueResolutionStrategy& value) { m_resolutionStrategyHasBeenSet = true; m_resolutionStrategy = value; } /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline void SetResolutionStrategy(SlotValueResolutionStrategy&& value) { m_resolutionStrategyHasBeenSet = true; m_resolutionStrategy = std::move(value); } /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline SlotValueSelectionSetting& WithResolutionStrategy(const SlotValueResolutionStrategy& value) { SetResolutionStrategy(value); return *this;} /** *

Determines the slot resolution strategy that Amazon Lex uses to return slot * type values. The field can be set to one of the following values:

  • *

    ORIGINAL_VALUE - Returns the value entered by the user, if the * user value is similar to the slot value.

  • * TOP_RESOLUTION - If there is a resolution list for the slot, return * the first value in the resolution list as the slot type value. If there is no * resolution list, null is returned.

If you don't specify the * valueSelectionStrategy, the default is * ORIGINAL_VALUE.

*/ inline SlotValueSelectionSetting& WithResolutionStrategy(SlotValueResolutionStrategy&& value) { SetResolutionStrategy(std::move(value)); return *this;} /** *

A regular expression used to validate the value of a slot.

*/ inline const SlotValueRegexFilter& GetRegexFilter() const{ return m_regexFilter; } /** *

A regular expression used to validate the value of a slot.

*/ inline bool RegexFilterHasBeenSet() const { return m_regexFilterHasBeenSet; } /** *

A regular expression used to validate the value of a slot.

*/ inline void SetRegexFilter(const SlotValueRegexFilter& value) { m_regexFilterHasBeenSet = true; m_regexFilter = value; } /** *

A regular expression used to validate the value of a slot.

*/ inline void SetRegexFilter(SlotValueRegexFilter&& value) { m_regexFilterHasBeenSet = true; m_regexFilter = std::move(value); } /** *

A regular expression used to validate the value of a slot.

*/ inline SlotValueSelectionSetting& WithRegexFilter(const SlotValueRegexFilter& value) { SetRegexFilter(value); return *this;} /** *

A regular expression used to validate the value of a slot.

*/ inline SlotValueSelectionSetting& WithRegexFilter(SlotValueRegexFilter&& value) { SetRegexFilter(std::move(value)); return *this;} /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline const AdvancedRecognitionSetting& GetAdvancedRecognitionSetting() const{ return m_advancedRecognitionSetting; } /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline bool AdvancedRecognitionSettingHasBeenSet() const { return m_advancedRecognitionSettingHasBeenSet; } /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline void SetAdvancedRecognitionSetting(const AdvancedRecognitionSetting& value) { m_advancedRecognitionSettingHasBeenSet = true; m_advancedRecognitionSetting = value; } /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline void SetAdvancedRecognitionSetting(AdvancedRecognitionSetting&& value) { m_advancedRecognitionSettingHasBeenSet = true; m_advancedRecognitionSetting = std::move(value); } /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline SlotValueSelectionSetting& WithAdvancedRecognitionSetting(const AdvancedRecognitionSetting& value) { SetAdvancedRecognitionSetting(value); return *this;} /** *

Provides settings that enable advanced recognition settings for slot values. * You can use this to enable using slot values as a custom vocabulary for * recognizing user utterances.

*/ inline SlotValueSelectionSetting& WithAdvancedRecognitionSetting(AdvancedRecognitionSetting&& value) { SetAdvancedRecognitionSetting(std::move(value)); return *this;} private: SlotValueResolutionStrategy m_resolutionStrategy; bool m_resolutionStrategyHasBeenSet = false; SlotValueRegexFilter m_regexFilter; bool m_regexFilterHasBeenSet = false; AdvancedRecognitionSetting m_advancedRecognitionSetting; bool m_advancedRecognitionSettingHasBeenSet = false; }; } // namespace Model } // namespace LexModelsV2 } // namespace Aws