All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.lexruntime.model.IntentSummary Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.lexruntime.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Provides information about the state of an intent. You can use this information to get the current state of an intent * so that you can process the intent, or so that you can return the intent to its previous state. *

*/ @Generated("software.amazon.awssdk:codegen") public final class IntentSummary implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField INTENT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("intentName").getter(getter(IntentSummary::intentName)).setter(setter(Builder::intentName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("intentName").build()).build(); private static final SdkField CHECKPOINT_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("checkpointLabel").getter(getter(IntentSummary::checkpointLabel)) .setter(setter(Builder::checkpointLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("checkpointLabel").build()).build(); private static final SdkField> SLOTS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("slots") .getter(getter(IntentSummary::slots)) .setter(setter(Builder::slots)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("slots").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField CONFIRMATION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("confirmationStatus").getter(getter(IntentSummary::confirmationStatusAsString)) .setter(setter(Builder::confirmationStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("confirmationStatus").build()) .build(); private static final SdkField DIALOG_ACTION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("dialogActionType").getter(getter(IntentSummary::dialogActionTypeAsString)) .setter(setter(Builder::dialogActionType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dialogActionType").build()).build(); private static final SdkField FULFILLMENT_STATE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("fulfillmentState").getter(getter(IntentSummary::fulfillmentStateAsString)) .setter(setter(Builder::fulfillmentState)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fulfillmentState").build()).build(); private static final SdkField SLOT_TO_ELICIT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("slotToElicit").getter(getter(IntentSummary::slotToElicit)).setter(setter(Builder::slotToElicit)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("slotToElicit").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(INTENT_NAME_FIELD, CHECKPOINT_LABEL_FIELD, SLOTS_FIELD, CONFIRMATION_STATUS_FIELD, DIALOG_ACTION_TYPE_FIELD, FULFILLMENT_STATE_FIELD, SLOT_TO_ELICIT_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String intentName; private final String checkpointLabel; private final Map slots; private final String confirmationStatus; private final String dialogActionType; private final String fulfillmentState; private final String slotToElicit; private IntentSummary(BuilderImpl builder) { this.intentName = builder.intentName; this.checkpointLabel = builder.checkpointLabel; this.slots = builder.slots; this.confirmationStatus = builder.confirmationStatus; this.dialogActionType = builder.dialogActionType; this.fulfillmentState = builder.fulfillmentState; this.slotToElicit = builder.slotToElicit; } /** *

* The name of the intent. *

* * @return The name of the intent. */ public final String intentName() { return intentName; } /** *

* A user-defined label that identifies a particular intent. You can use this label to return to a previous intent. *

*

* Use the checkpointLabelFilter parameter of the GetSessionRequest operation to filter * the intents returned by the operation to those with only the specified label. *

* * @return A user-defined label that identifies a particular intent. You can use this label to return to a previous * intent.

*

* Use the checkpointLabelFilter parameter of the GetSessionRequest operation to * filter the intents returned by the operation to those with only the specified label. */ public final String checkpointLabel() { return checkpointLabel; } /** * For responses, this returns true if the service returned a value for the Slots property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasSlots() { return slots != null && !(slots instanceof SdkAutoConstructMap); } /** *

* Map of the slots that have been gathered and their values. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSlots} method. *

* * @return Map of the slots that have been gathered and their values. */ public final Map slots() { return slots; } /** *

* The status of the intent after the user responds to the confirmation prompt. If the user confirms the intent, * Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex sets this value * to Denied. The possible values are: *

*
    *
  • *

    * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the intent is * complete and that it is ready to be fulfilled. *

    *
  • *
  • *

    * Denied - The user has responded "No" to the confirmation prompt. *

    *
  • *
  • *

    * None - The user has never been prompted for confirmation; or, the user was prompted but did not * confirm or deny the prompt. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, * {@link #confirmationStatus} will return {@link ConfirmationStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #confirmationStatusAsString}. *

* * @return The status of the intent after the user responds to the confirmation prompt. If the user confirms the * intent, Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex * sets this value to Denied. The possible values are:

*
    *
  • *

    * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the * intent is complete and that it is ready to be fulfilled. *

    *
  • *
  • *

    * Denied - The user has responded "No" to the confirmation prompt. *

    *
  • *
  • *

    * None - The user has never been prompted for confirmation; or, the user was prompted but did * not confirm or deny the prompt. *

    *
  • * @see ConfirmationStatus */ public final ConfirmationStatus confirmationStatus() { return ConfirmationStatus.fromValue(confirmationStatus); } /** *

    * The status of the intent after the user responds to the confirmation prompt. If the user confirms the intent, * Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex sets this value * to Denied. The possible values are: *

    *
      *
    • *

      * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the intent is * complete and that it is ready to be fulfilled. *

      *
    • *
    • *

      * Denied - The user has responded "No" to the confirmation prompt. *

      *
    • *
    • *

      * None - The user has never been prompted for confirmation; or, the user was prompted but did not * confirm or deny the prompt. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, * {@link #confirmationStatus} will return {@link ConfirmationStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #confirmationStatusAsString}. *

    * * @return The status of the intent after the user responds to the confirmation prompt. If the user confirms the * intent, Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex * sets this value to Denied. The possible values are:

    *
      *
    • *

      * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the * intent is complete and that it is ready to be fulfilled. *

      *
    • *
    • *

      * Denied - The user has responded "No" to the confirmation prompt. *

      *
    • *
    • *

      * None - The user has never been prompted for confirmation; or, the user was prompted but did * not confirm or deny the prompt. *

      *
    • * @see ConfirmationStatus */ public final String confirmationStatusAsString() { return confirmationStatus; } /** *

      * The next action that the bot should take in its interaction with the user. The possible values are: *

      *
        *
      • *

        * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

        *
      • *
      • *

        * Close - Indicates that the there will not be a response from the user. For example, the statement * "Your order has been placed" does not require a response. *

        *
      • *
      • *

        * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

        *
      • *
      • *

        * ElicitSlot - The next action is to elicit a slot value from the user. *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #dialogActionType} * will return {@link DialogActionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #dialogActionTypeAsString}. *

      * * @return The next action that the bot should take in its interaction with the user. The possible values are:

      *
        *
      • *

        * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

        *
      • *
      • *

        * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

        *
      • *
      • *

        * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

        *
      • *
      • *

        * ElicitSlot - The next action is to elicit a slot value from the user. *

        *
      • * @see DialogActionType */ public final DialogActionType dialogActionType() { return DialogActionType.fromValue(dialogActionType); } /** *

        * The next action that the bot should take in its interaction with the user. The possible values are: *

        *
          *
        • *

          * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

          *
        • *
        • *

          * Close - Indicates that the there will not be a response from the user. For example, the statement * "Your order has been placed" does not require a response. *

          *
        • *
        • *

          * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

          *
        • *
        • *

          * ElicitSlot - The next action is to elicit a slot value from the user. *

          *
        • *
        *

        * If the service returns an enum value that is not available in the current SDK version, {@link #dialogActionType} * will return {@link DialogActionType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #dialogActionTypeAsString}. *

        * * @return The next action that the bot should take in its interaction with the user. The possible values are:

        *
          *
        • *

          * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

          *
        • *
        • *

          * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

          *
        • *
        • *

          * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

          *
        • *
        • *

          * ElicitSlot - The next action is to elicit a slot value from the user. *

          *
        • * @see DialogActionType */ public final String dialogActionTypeAsString() { return dialogActionType; } /** *

          * The fulfillment state of the intent. The possible values are: *

          *
            *
          • *

            * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

            *
          • *
          • *

            * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

            *
          • *
          • *

            * ReadyForFulfillment - All of the information necessary for the intent is present and the intent * ready to be fulfilled by the client application. *

            *
          • *
          *

          * If the service returns an enum value that is not available in the current SDK version, {@link #fulfillmentState} * will return {@link FulfillmentState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #fulfillmentStateAsString}. *

          * * @return The fulfillment state of the intent. The possible values are:

          *
            *
          • *

            * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

            *
          • *
          • *

            * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

            *
          • *
          • *

            * ReadyForFulfillment - All of the information necessary for the intent is present and the * intent ready to be fulfilled by the client application. *

            *
          • * @see FulfillmentState */ public final FulfillmentState fulfillmentState() { return FulfillmentState.fromValue(fulfillmentState); } /** *

            * The fulfillment state of the intent. The possible values are: *

            *
              *
            • *

              * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

              *
            • *
            • *

              * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

              *
            • *
            • *

              * ReadyForFulfillment - All of the information necessary for the intent is present and the intent * ready to be fulfilled by the client application. *

              *
            • *
            *

            * If the service returns an enum value that is not available in the current SDK version, {@link #fulfillmentState} * will return {@link FulfillmentState#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #fulfillmentStateAsString}. *

            * * @return The fulfillment state of the intent. The possible values are:

            *
              *
            • *

              * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

              *
            • *
            • *

              * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

              *
            • *
            • *

              * ReadyForFulfillment - All of the information necessary for the intent is present and the * intent ready to be fulfilled by the client application. *

              *
            • * @see FulfillmentState */ public final String fulfillmentStateAsString() { return fulfillmentState; } /** *

              * The next slot to elicit from the user. If there is not slot to elicit, the field is blank. *

              * * @return The next slot to elicit from the user. If there is not slot to elicit, the field is blank. */ public final String slotToElicit() { return slotToElicit; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(intentName()); hashCode = 31 * hashCode + Objects.hashCode(checkpointLabel()); hashCode = 31 * hashCode + Objects.hashCode(hasSlots() ? slots() : null); hashCode = 31 * hashCode + Objects.hashCode(confirmationStatusAsString()); hashCode = 31 * hashCode + Objects.hashCode(dialogActionTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(fulfillmentStateAsString()); hashCode = 31 * hashCode + Objects.hashCode(slotToElicit()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof IntentSummary)) { return false; } IntentSummary other = (IntentSummary) obj; return Objects.equals(intentName(), other.intentName()) && Objects.equals(checkpointLabel(), other.checkpointLabel()) && hasSlots() == other.hasSlots() && Objects.equals(slots(), other.slots()) && Objects.equals(confirmationStatusAsString(), other.confirmationStatusAsString()) && Objects.equals(dialogActionTypeAsString(), other.dialogActionTypeAsString()) && Objects.equals(fulfillmentStateAsString(), other.fulfillmentStateAsString()) && Objects.equals(slotToElicit(), other.slotToElicit()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("IntentSummary").add("IntentName", intentName()).add("CheckpointLabel", checkpointLabel()) .add("Slots", slots() == null ? null : "*** Sensitive Data Redacted ***") .add("ConfirmationStatus", confirmationStatusAsString()).add("DialogActionType", dialogActionTypeAsString()) .add("FulfillmentState", fulfillmentStateAsString()).add("SlotToElicit", slotToElicit()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "intentName": return Optional.ofNullable(clazz.cast(intentName())); case "checkpointLabel": return Optional.ofNullable(clazz.cast(checkpointLabel())); case "slots": return Optional.ofNullable(clazz.cast(slots())); case "confirmationStatus": return Optional.ofNullable(clazz.cast(confirmationStatusAsString())); case "dialogActionType": return Optional.ofNullable(clazz.cast(dialogActionTypeAsString())); case "fulfillmentState": return Optional.ofNullable(clazz.cast(fulfillmentStateAsString())); case "slotToElicit": return Optional.ofNullable(clazz.cast(slotToElicit())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("intentName", INTENT_NAME_FIELD); map.put("checkpointLabel", CHECKPOINT_LABEL_FIELD); map.put("slots", SLOTS_FIELD); map.put("confirmationStatus", CONFIRMATION_STATUS_FIELD); map.put("dialogActionType", DIALOG_ACTION_TYPE_FIELD); map.put("fulfillmentState", FULFILLMENT_STATE_FIELD); map.put("slotToElicit", SLOT_TO_ELICIT_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((IntentSummary) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

              * The name of the intent. *

              * * @param intentName * The name of the intent. * @return Returns a reference to this object so that method calls can be chained together. */ Builder intentName(String intentName); /** *

              * A user-defined label that identifies a particular intent. You can use this label to return to a previous * intent. *

              *

              * Use the checkpointLabelFilter parameter of the GetSessionRequest operation to * filter the intents returned by the operation to those with only the specified label. *

              * * @param checkpointLabel * A user-defined label that identifies a particular intent. You can use this label to return to a * previous intent.

              *

              * Use the checkpointLabelFilter parameter of the GetSessionRequest operation * to filter the intents returned by the operation to those with only the specified label. * @return Returns a reference to this object so that method calls can be chained together. */ Builder checkpointLabel(String checkpointLabel); /** *

              * Map of the slots that have been gathered and their values. *

              * * @param slots * Map of the slots that have been gathered and their values. * @return Returns a reference to this object so that method calls can be chained together. */ Builder slots(Map slots); /** *

              * The status of the intent after the user responds to the confirmation prompt. If the user confirms the intent, * Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex sets this * value to Denied. The possible values are: *

              *
                *
              • *

                * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the intent * is complete and that it is ready to be fulfilled. *

                *
              • *
              • *

                * Denied - The user has responded "No" to the confirmation prompt. *

                *
              • *
              • *

                * None - The user has never been prompted for confirmation; or, the user was prompted but did not * confirm or deny the prompt. *

                *
              • *
              * * @param confirmationStatus * The status of the intent after the user responds to the confirmation prompt. If the user confirms the * intent, Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon * Lex sets this value to Denied. The possible values are:

              *
                *
              • *

                * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the * intent is complete and that it is ready to be fulfilled. *

                *
              • *
              • *

                * Denied - The user has responded "No" to the confirmation prompt. *

                *
              • *
              • *

                * None - The user has never been prompted for confirmation; or, the user was prompted but * did not confirm or deny the prompt. *

                *
              • * @see ConfirmationStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ConfirmationStatus */ Builder confirmationStatus(String confirmationStatus); /** *

                * The status of the intent after the user responds to the confirmation prompt. If the user confirms the intent, * Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon Lex sets this * value to Denied. The possible values are: *

                *
                  *
                • *

                  * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the intent * is complete and that it is ready to be fulfilled. *

                  *
                • *
                • *

                  * Denied - The user has responded "No" to the confirmation prompt. *

                  *
                • *
                • *

                  * None - The user has never been prompted for confirmation; or, the user was prompted but did not * confirm or deny the prompt. *

                  *
                • *
                * * @param confirmationStatus * The status of the intent after the user responds to the confirmation prompt. If the user confirms the * intent, Amazon Lex sets this field to Confirmed. If the user denies the intent, Amazon * Lex sets this value to Denied. The possible values are:

                *
                  *
                • *

                  * Confirmed - The user has responded "Yes" to the confirmation prompt, confirming that the * intent is complete and that it is ready to be fulfilled. *

                  *
                • *
                • *

                  * Denied - The user has responded "No" to the confirmation prompt. *

                  *
                • *
                • *

                  * None - The user has never been prompted for confirmation; or, the user was prompted but * did not confirm or deny the prompt. *

                  *
                • * @see ConfirmationStatus * @return Returns a reference to this object so that method calls can be chained together. * @see ConfirmationStatus */ Builder confirmationStatus(ConfirmationStatus confirmationStatus); /** *

                  * The next action that the bot should take in its interaction with the user. The possible values are: *

                  *
                    *
                  • *

                    * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

                    *
                  • *
                  • *

                    * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

                    *
                  • *
                  • *

                    * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

                    *
                  • *
                  • *

                    * ElicitSlot - The next action is to elicit a slot value from the user. *

                    *
                  • *
                  * * @param dialogActionType * The next action that the bot should take in its interaction with the user. The possible values * are:

                  *
                    *
                  • *

                    * ConfirmIntent - The next action is asking the user if the intent is complete and ready to * be fulfilled. This is a yes/no question such as "Place the order?" *

                    *
                  • *
                  • *

                    * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

                    *
                  • *
                  • *

                    * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

                    *
                  • *
                  • *

                    * ElicitSlot - The next action is to elicit a slot value from the user. *

                    *
                  • * @see DialogActionType * @return Returns a reference to this object so that method calls can be chained together. * @see DialogActionType */ Builder dialogActionType(String dialogActionType); /** *

                    * The next action that the bot should take in its interaction with the user. The possible values are: *

                    *
                      *
                    • *

                      * ConfirmIntent - The next action is asking the user if the intent is complete and ready to be * fulfilled. This is a yes/no question such as "Place the order?" *

                      *
                    • *
                    • *

                      * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

                      *
                    • *
                    • *

                      * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

                      *
                    • *
                    • *

                      * ElicitSlot - The next action is to elicit a slot value from the user. *

                      *
                    • *
                    * * @param dialogActionType * The next action that the bot should take in its interaction with the user. The possible values * are:

                    *
                      *
                    • *

                      * ConfirmIntent - The next action is asking the user if the intent is complete and ready to * be fulfilled. This is a yes/no question such as "Place the order?" *

                      *
                    • *
                    • *

                      * Close - Indicates that the there will not be a response from the user. For example, the * statement "Your order has been placed" does not require a response. *

                      *
                    • *
                    • *

                      * ElicitIntent - The next action is to determine the intent that the user wants to fulfill. *

                      *
                    • *
                    • *

                      * ElicitSlot - The next action is to elicit a slot value from the user. *

                      *
                    • * @see DialogActionType * @return Returns a reference to this object so that method calls can be chained together. * @see DialogActionType */ Builder dialogActionType(DialogActionType dialogActionType); /** *

                      * The fulfillment state of the intent. The possible values are: *

                      *
                        *
                      • *

                        * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

                        *
                      • *
                      • *

                        * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

                        *
                      • *
                      • *

                        * ReadyForFulfillment - All of the information necessary for the intent is present and the intent * ready to be fulfilled by the client application. *

                        *
                      • *
                      * * @param fulfillmentState * The fulfillment state of the intent. The possible values are:

                      *
                        *
                      • *

                        * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

                        *
                      • *
                      • *

                        * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

                        *
                      • *
                      • *

                        * ReadyForFulfillment - All of the information necessary for the intent is present and the * intent ready to be fulfilled by the client application. *

                        *
                      • * @see FulfillmentState * @return Returns a reference to this object so that method calls can be chained together. * @see FulfillmentState */ Builder fulfillmentState(String fulfillmentState); /** *

                        * The fulfillment state of the intent. The possible values are: *

                        *
                          *
                        • *

                          * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

                          *
                        • *
                        • *

                          * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

                          *
                        • *
                        • *

                          * ReadyForFulfillment - All of the information necessary for the intent is present and the intent * ready to be fulfilled by the client application. *

                          *
                        • *
                        * * @param fulfillmentState * The fulfillment state of the intent. The possible values are:

                        *
                          *
                        • *

                          * Failed - The Lambda function associated with the intent failed to fulfill the intent. *

                          *
                        • *
                        • *

                          * Fulfilled - The intent has fulfilled by the Lambda function associated with the intent. *

                          *
                        • *
                        • *

                          * ReadyForFulfillment - All of the information necessary for the intent is present and the * intent ready to be fulfilled by the client application. *

                          *
                        • * @see FulfillmentState * @return Returns a reference to this object so that method calls can be chained together. * @see FulfillmentState */ Builder fulfillmentState(FulfillmentState fulfillmentState); /** *

                          * The next slot to elicit from the user. If there is not slot to elicit, the field is blank. *

                          * * @param slotToElicit * The next slot to elicit from the user. If there is not slot to elicit, the field is blank. * @return Returns a reference to this object so that method calls can be chained together. */ Builder slotToElicit(String slotToElicit); } static final class BuilderImpl implements Builder { private String intentName; private String checkpointLabel; private Map slots = DefaultSdkAutoConstructMap.getInstance(); private String confirmationStatus; private String dialogActionType; private String fulfillmentState; private String slotToElicit; private BuilderImpl() { } private BuilderImpl(IntentSummary model) { intentName(model.intentName); checkpointLabel(model.checkpointLabel); slots(model.slots); confirmationStatus(model.confirmationStatus); dialogActionType(model.dialogActionType); fulfillmentState(model.fulfillmentState); slotToElicit(model.slotToElicit); } public final String getIntentName() { return intentName; } public final void setIntentName(String intentName) { this.intentName = intentName; } @Override public final Builder intentName(String intentName) { this.intentName = intentName; return this; } public final String getCheckpointLabel() { return checkpointLabel; } public final void setCheckpointLabel(String checkpointLabel) { this.checkpointLabel = checkpointLabel; } @Override public final Builder checkpointLabel(String checkpointLabel) { this.checkpointLabel = checkpointLabel; return this; } public final Map getSlots() { if (slots instanceof SdkAutoConstructMap) { return null; } return slots; } public final void setSlots(Map slots) { this.slots = StringMapCopier.copy(slots); } @Override public final Builder slots(Map slots) { this.slots = StringMapCopier.copy(slots); return this; } public final String getConfirmationStatus() { return confirmationStatus; } public final void setConfirmationStatus(String confirmationStatus) { this.confirmationStatus = confirmationStatus; } @Override public final Builder confirmationStatus(String confirmationStatus) { this.confirmationStatus = confirmationStatus; return this; } @Override public final Builder confirmationStatus(ConfirmationStatus confirmationStatus) { this.confirmationStatus(confirmationStatus == null ? null : confirmationStatus.toString()); return this; } public final String getDialogActionType() { return dialogActionType; } public final void setDialogActionType(String dialogActionType) { this.dialogActionType = dialogActionType; } @Override public final Builder dialogActionType(String dialogActionType) { this.dialogActionType = dialogActionType; return this; } @Override public final Builder dialogActionType(DialogActionType dialogActionType) { this.dialogActionType(dialogActionType == null ? null : dialogActionType.toString()); return this; } public final String getFulfillmentState() { return fulfillmentState; } public final void setFulfillmentState(String fulfillmentState) { this.fulfillmentState = fulfillmentState; } @Override public final Builder fulfillmentState(String fulfillmentState) { this.fulfillmentState = fulfillmentState; return this; } @Override public final Builder fulfillmentState(FulfillmentState fulfillmentState) { this.fulfillmentState(fulfillmentState == null ? null : fulfillmentState.toString()); return this; } public final String getSlotToElicit() { return slotToElicit; } public final void setSlotToElicit(String slotToElicit) { this.slotToElicit = slotToElicit; } @Override public final Builder slotToElicit(String slotToElicit) { this.slotToElicit = slotToElicit; return this; } @Override public IntentSummary build() { return new IntentSummary(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy