
software.amazon.awssdk.services.lexmodelbuilding.model.PutIntentResponse 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.lexmodelbuilding.model;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
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.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*/
@Generated("software.amazon.awssdk:codegen")
public final class PutIntentResponse extends LexModelBuildingResponse implements
ToCopyableBuilder {
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(PutIntentResponse::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("description").getter(getter(PutIntentResponse::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();
private static final SdkField> SLOTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("slots")
.getter(getter(PutIntentResponse::slots))
.setter(setter(Builder::slots))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("slots").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(Slot::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> SAMPLE_UTTERANCES_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("sampleUtterances")
.getter(getter(PutIntentResponse::sampleUtterances))
.setter(setter(Builder::sampleUtterances))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sampleUtterances").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField CONFIRMATION_PROMPT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("confirmationPrompt").getter(getter(PutIntentResponse::confirmationPrompt))
.setter(setter(Builder::confirmationPrompt)).constructor(Prompt::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("confirmationPrompt").build())
.build();
private static final SdkField REJECTION_STATEMENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("rejectionStatement").getter(getter(PutIntentResponse::rejectionStatement))
.setter(setter(Builder::rejectionStatement)).constructor(Statement::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("rejectionStatement").build())
.build();
private static final SdkField FOLLOW_UP_PROMPT_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("followUpPrompt")
.getter(getter(PutIntentResponse::followUpPrompt)).setter(setter(Builder::followUpPrompt))
.constructor(FollowUpPrompt::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("followUpPrompt").build()).build();
private static final SdkField CONCLUSION_STATEMENT_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("conclusionStatement").getter(getter(PutIntentResponse::conclusionStatement))
.setter(setter(Builder::conclusionStatement)).constructor(Statement::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("conclusionStatement").build())
.build();
private static final SdkField DIALOG_CODE_HOOK_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("dialogCodeHook").getter(getter(PutIntentResponse::dialogCodeHook))
.setter(setter(Builder::dialogCodeHook)).constructor(CodeHook::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dialogCodeHook").build()).build();
private static final SdkField FULFILLMENT_ACTIVITY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("fulfillmentActivity")
.getter(getter(PutIntentResponse::fulfillmentActivity)).setter(setter(Builder::fulfillmentActivity))
.constructor(FulfillmentActivity::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fulfillmentActivity").build())
.build();
private static final SdkField PARENT_INTENT_SIGNATURE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("parentIntentSignature").getter(getter(PutIntentResponse::parentIntentSignature))
.setter(setter(Builder::parentIntentSignature))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parentIntentSignature").build())
.build();
private static final SdkField LAST_UPDATED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("lastUpdatedDate").getter(getter(PutIntentResponse::lastUpdatedDate))
.setter(setter(Builder::lastUpdatedDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lastUpdatedDate").build()).build();
private static final SdkField CREATED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("createdDate").getter(getter(PutIntentResponse::createdDate)).setter(setter(Builder::createdDate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdDate").build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("version")
.getter(getter(PutIntentResponse::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("version").build()).build();
private static final SdkField CHECKSUM_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("checksum").getter(getter(PutIntentResponse::checksum)).setter(setter(Builder::checksum))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("checksum").build()).build();
private static final SdkField CREATE_VERSION_FIELD = SdkField. builder(MarshallingType.BOOLEAN)
.memberName("createVersion").getter(getter(PutIntentResponse::createVersion)).setter(setter(Builder::createVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createVersion").build()).build();
private static final SdkField KENDRA_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("kendraConfiguration")
.getter(getter(PutIntentResponse::kendraConfiguration)).setter(setter(Builder::kendraConfiguration))
.constructor(KendraConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kendraConfiguration").build())
.build();
private static final SdkField> INPUT_CONTEXTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("inputContexts")
.getter(getter(PutIntentResponse::inputContexts))
.setter(setter(Builder::inputContexts))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("inputContexts").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(InputContext::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField> OUTPUT_CONTEXTS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("outputContexts")
.getter(getter(PutIntentResponse::outputContexts))
.setter(setter(Builder::outputContexts))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("outputContexts").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(OutputContext::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, DESCRIPTION_FIELD,
SLOTS_FIELD, SAMPLE_UTTERANCES_FIELD, CONFIRMATION_PROMPT_FIELD, REJECTION_STATEMENT_FIELD, FOLLOW_UP_PROMPT_FIELD,
CONCLUSION_STATEMENT_FIELD, DIALOG_CODE_HOOK_FIELD, FULFILLMENT_ACTIVITY_FIELD, PARENT_INTENT_SIGNATURE_FIELD,
LAST_UPDATED_DATE_FIELD, CREATED_DATE_FIELD, VERSION_FIELD, CHECKSUM_FIELD, CREATE_VERSION_FIELD,
KENDRA_CONFIGURATION_FIELD, INPUT_CONTEXTS_FIELD, OUTPUT_CONTEXTS_FIELD));
private final String name;
private final String description;
private final List slots;
private final List sampleUtterances;
private final Prompt confirmationPrompt;
private final Statement rejectionStatement;
private final FollowUpPrompt followUpPrompt;
private final Statement conclusionStatement;
private final CodeHook dialogCodeHook;
private final FulfillmentActivity fulfillmentActivity;
private final String parentIntentSignature;
private final Instant lastUpdatedDate;
private final Instant createdDate;
private final String version;
private final String checksum;
private final Boolean createVersion;
private final KendraConfiguration kendraConfiguration;
private final List inputContexts;
private final List outputContexts;
private PutIntentResponse(BuilderImpl builder) {
super(builder);
this.name = builder.name;
this.description = builder.description;
this.slots = builder.slots;
this.sampleUtterances = builder.sampleUtterances;
this.confirmationPrompt = builder.confirmationPrompt;
this.rejectionStatement = builder.rejectionStatement;
this.followUpPrompt = builder.followUpPrompt;
this.conclusionStatement = builder.conclusionStatement;
this.dialogCodeHook = builder.dialogCodeHook;
this.fulfillmentActivity = builder.fulfillmentActivity;
this.parentIntentSignature = builder.parentIntentSignature;
this.lastUpdatedDate = builder.lastUpdatedDate;
this.createdDate = builder.createdDate;
this.version = builder.version;
this.checksum = builder.checksum;
this.createVersion = builder.createVersion;
this.kendraConfiguration = builder.kendraConfiguration;
this.inputContexts = builder.inputContexts;
this.outputContexts = builder.outputContexts;
}
/**
*
* The name of the intent.
*
*
* @return The name of the intent.
*/
public final String name() {
return name;
}
/**
*
* A description of the intent.
*
*
* @return A description of the intent.
*/
public final String description() {
return description;
}
/**
* 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 SdkAutoConstructList);
}
/**
*
* An array of intent slots that are configured for the intent.
*
*
* 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 An array of intent slots that are configured for the intent.
*/
public final List slots() {
return slots;
}
/**
* For responses, this returns true if the service returned a value for the SampleUtterances 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 hasSampleUtterances() {
return sampleUtterances != null && !(sampleUtterances instanceof SdkAutoConstructList);
}
/**
*
* An array of sample utterances that are configured for the intent.
*
*
* 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 #hasSampleUtterances} method.
*
*
* @return An array of sample utterances that are configured for the intent.
*/
public final List sampleUtterances() {
return sampleUtterances;
}
/**
*
* If defined in the intent, Amazon Lex prompts the user to confirm the intent before fulfilling it.
*
*
* @return If defined in the intent, Amazon Lex prompts the user to confirm the intent before fulfilling it.
*/
public final Prompt confirmationPrompt() {
return confirmationPrompt;
}
/**
*
* If the user answers "no" to the question defined in confirmationPrompt
Amazon Lex responds with this
* statement to acknowledge that the intent was canceled.
*
*
* @return If the user answers "no" to the question defined in confirmationPrompt
Amazon Lex responds
* with this statement to acknowledge that the intent was canceled.
*/
public final Statement rejectionStatement() {
return rejectionStatement;
}
/**
*
* If defined in the intent, Amazon Lex uses this prompt to solicit additional user activity after the intent is
* fulfilled.
*
*
* @return If defined in the intent, Amazon Lex uses this prompt to solicit additional user activity after the
* intent is fulfilled.
*/
public final FollowUpPrompt followUpPrompt() {
return followUpPrompt;
}
/**
*
* After the Lambda function specified in thefulfillmentActivity
intent fulfills the intent, Amazon Lex
* conveys this statement to the user.
*
*
* @return After the Lambda function specified in thefulfillmentActivity
intent fulfills the intent,
* Amazon Lex conveys this statement to the user.
*/
public final Statement conclusionStatement() {
return conclusionStatement;
}
/**
*
* If defined in the intent, Amazon Lex invokes this Lambda function for each user input.
*
*
* @return If defined in the intent, Amazon Lex invokes this Lambda function for each user input.
*/
public final CodeHook dialogCodeHook() {
return dialogCodeHook;
}
/**
*
* If defined in the intent, Amazon Lex invokes this Lambda function to fulfill the intent after the user provides
* all of the information required by the intent.
*
*
* @return If defined in the intent, Amazon Lex invokes this Lambda function to fulfill the intent after the user
* provides all of the information required by the intent.
*/
public final FulfillmentActivity fulfillmentActivity() {
return fulfillmentActivity;
}
/**
*
* A unique identifier for the built-in intent that this intent is based on.
*
*
* @return A unique identifier for the built-in intent that this intent is based on.
*/
public final String parentIntentSignature() {
return parentIntentSignature;
}
/**
*
* The date that the intent was updated. When you create a resource, the creation date and last update dates are the
* same.
*
*
* @return The date that the intent was updated. When you create a resource, the creation date and last update dates
* are the same.
*/
public final Instant lastUpdatedDate() {
return lastUpdatedDate;
}
/**
*
* The date that the intent was created.
*
*
* @return The date that the intent was created.
*/
public final Instant createdDate() {
return createdDate;
}
/**
*
* The version of the intent. For a new intent, the version is always $LATEST
.
*
*
* @return The version of the intent. For a new intent, the version is always $LATEST
.
*/
public final String version() {
return version;
}
/**
*
* Checksum of the $LATEST
version of the intent created or updated.
*
*
* @return Checksum of the $LATEST
version of the intent created or updated.
*/
public final String checksum() {
return checksum;
}
/**
*
* True
if a new version of the intent was created. If the createVersion
field was not
* specified in the request, the createVersion
field is set to false in the response.
*
*
* @return True
if a new version of the intent was created. If the createVersion
field was
* not specified in the request, the createVersion
field is set to false in the response.
*/
public final Boolean createVersion() {
return createVersion;
}
/**
*
* Configuration information, if any, required to connect to an Amazon Kendra index and use the
* AMAZON.KendraSearchIntent
intent.
*
*
* @return Configuration information, if any, required to connect to an Amazon Kendra index and use the
* AMAZON.KendraSearchIntent
intent.
*/
public final KendraConfiguration kendraConfiguration() {
return kendraConfiguration;
}
/**
* For responses, this returns true if the service returned a value for the InputContexts 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 hasInputContexts() {
return inputContexts != null && !(inputContexts instanceof SdkAutoConstructList);
}
/**
*
* An array of InputContext
objects that lists the contexts that must be active for Amazon Lex to
* choose the intent in a conversation with the user.
*
*
* 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 #hasInputContexts} method.
*
*
* @return An array of InputContext
objects that lists the contexts that must be active for Amazon Lex
* to choose the intent in a conversation with the user.
*/
public final List inputContexts() {
return inputContexts;
}
/**
* For responses, this returns true if the service returned a value for the OutputContexts 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 hasOutputContexts() {
return outputContexts != null && !(outputContexts instanceof SdkAutoConstructList);
}
/**
*
* An array of OutputContext
objects that lists the contexts that the intent activates when the intent
* is fulfilled.
*
*
* 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 #hasOutputContexts} method.
*
*
* @return An array of OutputContext
objects that lists the contexts that the intent activates when the
* intent is fulfilled.
*/
public final List outputContexts() {
return outputContexts;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + super.hashCode();
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(hasSlots() ? slots() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasSampleUtterances() ? sampleUtterances() : null);
hashCode = 31 * hashCode + Objects.hashCode(confirmationPrompt());
hashCode = 31 * hashCode + Objects.hashCode(rejectionStatement());
hashCode = 31 * hashCode + Objects.hashCode(followUpPrompt());
hashCode = 31 * hashCode + Objects.hashCode(conclusionStatement());
hashCode = 31 * hashCode + Objects.hashCode(dialogCodeHook());
hashCode = 31 * hashCode + Objects.hashCode(fulfillmentActivity());
hashCode = 31 * hashCode + Objects.hashCode(parentIntentSignature());
hashCode = 31 * hashCode + Objects.hashCode(lastUpdatedDate());
hashCode = 31 * hashCode + Objects.hashCode(createdDate());
hashCode = 31 * hashCode + Objects.hashCode(version());
hashCode = 31 * hashCode + Objects.hashCode(checksum());
hashCode = 31 * hashCode + Objects.hashCode(createVersion());
hashCode = 31 * hashCode + Objects.hashCode(kendraConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(hasInputContexts() ? inputContexts() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasOutputContexts() ? outputContexts() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return super.equals(obj) && equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof PutIntentResponse)) {
return false;
}
PutIntentResponse other = (PutIntentResponse) obj;
return Objects.equals(name(), other.name()) && Objects.equals(description(), other.description())
&& hasSlots() == other.hasSlots() && Objects.equals(slots(), other.slots())
&& hasSampleUtterances() == other.hasSampleUtterances()
&& Objects.equals(sampleUtterances(), other.sampleUtterances())
&& Objects.equals(confirmationPrompt(), other.confirmationPrompt())
&& Objects.equals(rejectionStatement(), other.rejectionStatement())
&& Objects.equals(followUpPrompt(), other.followUpPrompt())
&& Objects.equals(conclusionStatement(), other.conclusionStatement())
&& Objects.equals(dialogCodeHook(), other.dialogCodeHook())
&& Objects.equals(fulfillmentActivity(), other.fulfillmentActivity())
&& Objects.equals(parentIntentSignature(), other.parentIntentSignature())
&& Objects.equals(lastUpdatedDate(), other.lastUpdatedDate())
&& Objects.equals(createdDate(), other.createdDate()) && Objects.equals(version(), other.version())
&& Objects.equals(checksum(), other.checksum()) && Objects.equals(createVersion(), other.createVersion())
&& Objects.equals(kendraConfiguration(), other.kendraConfiguration())
&& hasInputContexts() == other.hasInputContexts() && Objects.equals(inputContexts(), other.inputContexts())
&& hasOutputContexts() == other.hasOutputContexts() && Objects.equals(outputContexts(), other.outputContexts());
}
/**
* 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("PutIntentResponse").add("Name", name()).add("Description", description())
.add("Slots", hasSlots() ? slots() : null)
.add("SampleUtterances", hasSampleUtterances() ? sampleUtterances() : null)
.add("ConfirmationPrompt", confirmationPrompt()).add("RejectionStatement", rejectionStatement())
.add("FollowUpPrompt", followUpPrompt()).add("ConclusionStatement", conclusionStatement())
.add("DialogCodeHook", dialogCodeHook()).add("FulfillmentActivity", fulfillmentActivity())
.add("ParentIntentSignature", parentIntentSignature()).add("LastUpdatedDate", lastUpdatedDate())
.add("CreatedDate", createdDate()).add("Version", version()).add("Checksum", checksum())
.add("CreateVersion", createVersion()).add("KendraConfiguration", kendraConfiguration())
.add("InputContexts", hasInputContexts() ? inputContexts() : null)
.add("OutputContexts", hasOutputContexts() ? outputContexts() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "description":
return Optional.ofNullable(clazz.cast(description()));
case "slots":
return Optional.ofNullable(clazz.cast(slots()));
case "sampleUtterances":
return Optional.ofNullable(clazz.cast(sampleUtterances()));
case "confirmationPrompt":
return Optional.ofNullable(clazz.cast(confirmationPrompt()));
case "rejectionStatement":
return Optional.ofNullable(clazz.cast(rejectionStatement()));
case "followUpPrompt":
return Optional.ofNullable(clazz.cast(followUpPrompt()));
case "conclusionStatement":
return Optional.ofNullable(clazz.cast(conclusionStatement()));
case "dialogCodeHook":
return Optional.ofNullable(clazz.cast(dialogCodeHook()));
case "fulfillmentActivity":
return Optional.ofNullable(clazz.cast(fulfillmentActivity()));
case "parentIntentSignature":
return Optional.ofNullable(clazz.cast(parentIntentSignature()));
case "lastUpdatedDate":
return Optional.ofNullable(clazz.cast(lastUpdatedDate()));
case "createdDate":
return Optional.ofNullable(clazz.cast(createdDate()));
case "version":
return Optional.ofNullable(clazz.cast(version()));
case "checksum":
return Optional.ofNullable(clazz.cast(checksum()));
case "createVersion":
return Optional.ofNullable(clazz.cast(createVersion()));
case "kendraConfiguration":
return Optional.ofNullable(clazz.cast(kendraConfiguration()));
case "inputContexts":
return Optional.ofNullable(clazz.cast(inputContexts()));
case "outputContexts":
return Optional.ofNullable(clazz.cast(outputContexts()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function