Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.lexmodelsv2.model;
import java.io.Serializable;
import java.util.Arrays;
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 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.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class PostFulfillmentStatusSpecification implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField SUCCESS_RESPONSE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("successResponse")
.getter(getter(PostFulfillmentStatusSpecification::successResponse)).setter(setter(Builder::successResponse))
.constructor(ResponseSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("successResponse").build()).build();
private static final SdkField FAILURE_RESPONSE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("failureResponse")
.getter(getter(PostFulfillmentStatusSpecification::failureResponse)).setter(setter(Builder::failureResponse))
.constructor(ResponseSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("failureResponse").build()).build();
private static final SdkField TIMEOUT_RESPONSE_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("timeoutResponse")
.getter(getter(PostFulfillmentStatusSpecification::timeoutResponse)).setter(setter(Builder::timeoutResponse))
.constructor(ResponseSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeoutResponse").build()).build();
private static final SdkField SUCCESS_NEXT_STEP_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("successNextStep").getter(getter(PostFulfillmentStatusSpecification::successNextStep))
.setter(setter(Builder::successNextStep)).constructor(DialogState::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("successNextStep").build()).build();
private static final SdkField SUCCESS_CONDITIONAL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("successConditional")
.getter(getter(PostFulfillmentStatusSpecification::successConditional)).setter(setter(Builder::successConditional))
.constructor(ConditionalSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("successConditional").build())
.build();
private static final SdkField FAILURE_NEXT_STEP_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("failureNextStep").getter(getter(PostFulfillmentStatusSpecification::failureNextStep))
.setter(setter(Builder::failureNextStep)).constructor(DialogState::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("failureNextStep").build()).build();
private static final SdkField FAILURE_CONDITIONAL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("failureConditional")
.getter(getter(PostFulfillmentStatusSpecification::failureConditional)).setter(setter(Builder::failureConditional))
.constructor(ConditionalSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("failureConditional").build())
.build();
private static final SdkField TIMEOUT_NEXT_STEP_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("timeoutNextStep").getter(getter(PostFulfillmentStatusSpecification::timeoutNextStep))
.setter(setter(Builder::timeoutNextStep)).constructor(DialogState::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeoutNextStep").build()).build();
private static final SdkField TIMEOUT_CONDITIONAL_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("timeoutConditional")
.getter(getter(PostFulfillmentStatusSpecification::timeoutConditional)).setter(setter(Builder::timeoutConditional))
.constructor(ConditionalSpecification::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timeoutConditional").build())
.build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(SUCCESS_RESPONSE_FIELD,
FAILURE_RESPONSE_FIELD, TIMEOUT_RESPONSE_FIELD, SUCCESS_NEXT_STEP_FIELD, SUCCESS_CONDITIONAL_FIELD,
FAILURE_NEXT_STEP_FIELD, FAILURE_CONDITIONAL_FIELD, TIMEOUT_NEXT_STEP_FIELD, TIMEOUT_CONDITIONAL_FIELD));
private static final long serialVersionUID = 1L;
private final ResponseSpecification successResponse;
private final ResponseSpecification failureResponse;
private final ResponseSpecification timeoutResponse;
private final DialogState successNextStep;
private final ConditionalSpecification successConditional;
private final DialogState failureNextStep;
private final ConditionalSpecification failureConditional;
private final DialogState timeoutNextStep;
private final ConditionalSpecification timeoutConditional;
private PostFulfillmentStatusSpecification(BuilderImpl builder) {
this.successResponse = builder.successResponse;
this.failureResponse = builder.failureResponse;
this.timeoutResponse = builder.timeoutResponse;
this.successNextStep = builder.successNextStep;
this.successConditional = builder.successConditional;
this.failureNextStep = builder.failureNextStep;
this.failureConditional = builder.failureConditional;
this.timeoutNextStep = builder.timeoutNextStep;
this.timeoutConditional = builder.timeoutConditional;
}
/**
* Returns the value of the SuccessResponse property for this object.
*
* @return The value of the SuccessResponse property for this object.
*/
public final ResponseSpecification successResponse() {
return successResponse;
}
/**
* Returns the value of the FailureResponse property for this object.
*
* @return The value of the FailureResponse property for this object.
*/
public final ResponseSpecification failureResponse() {
return failureResponse;
}
/**
* Returns the value of the TimeoutResponse property for this object.
*
* @return The value of the TimeoutResponse property for this object.
*/
public final ResponseSpecification timeoutResponse() {
return timeoutResponse;
}
/**
*
* Specifies the next step in the conversation that Amazon Lex invokes when the fulfillment code hook completes
* successfully.
*
*
* @return Specifies the next step in the conversation that Amazon Lex invokes when the fulfillment code hook
* completes successfully.
*/
public final DialogState successNextStep() {
return successNextStep;
}
/**
*
* A list of conditional branches to evaluate after the fulfillment code hook finishes successfully.
*
*
* @return A list of conditional branches to evaluate after the fulfillment code hook finishes successfully.
*/
public final ConditionalSpecification successConditional() {
return successConditional;
}
/**
*
* Specifies the next step the bot runs after the fulfillment code hook throws an exception or returns with the
* State field of the Intent object set to Failed.
*
*
* @return Specifies the next step the bot runs after the fulfillment code hook throws an exception or returns with
* the State field of the Intent object set to Failed.
*/
public final DialogState failureNextStep() {
return failureNextStep;
}
/**
*
* A list of conditional branches to evaluate after the fulfillment code hook throws an exception or returns with
* the State field of the Intent object set to Failed.
*
*
* @return A list of conditional branches to evaluate after the fulfillment code hook throws an exception or returns
* with the State field of the Intent object set to Failed.
*/
public final ConditionalSpecification failureConditional() {
return failureConditional;
}
/**
*
* Specifies the next step that the bot runs when the fulfillment code hook times out.
*
*
* @return Specifies the next step that the bot runs when the fulfillment code hook times out.
*/
public final DialogState timeoutNextStep() {
return timeoutNextStep;
}
/**
*
* A list of conditional branches to evaluate if the fulfillment code hook times out.
*
*
* @return A list of conditional branches to evaluate if the fulfillment code hook times out.
*/
public final ConditionalSpecification timeoutConditional() {
return timeoutConditional;
}
@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 + Objects.hashCode(successResponse());
hashCode = 31 * hashCode + Objects.hashCode(failureResponse());
hashCode = 31 * hashCode + Objects.hashCode(timeoutResponse());
hashCode = 31 * hashCode + Objects.hashCode(successNextStep());
hashCode = 31 * hashCode + Objects.hashCode(successConditional());
hashCode = 31 * hashCode + Objects.hashCode(failureNextStep());
hashCode = 31 * hashCode + Objects.hashCode(failureConditional());
hashCode = 31 * hashCode + Objects.hashCode(timeoutNextStep());
hashCode = 31 * hashCode + Objects.hashCode(timeoutConditional());
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 PostFulfillmentStatusSpecification)) {
return false;
}
PostFulfillmentStatusSpecification other = (PostFulfillmentStatusSpecification) obj;
return Objects.equals(successResponse(), other.successResponse())
&& Objects.equals(failureResponse(), other.failureResponse())
&& Objects.equals(timeoutResponse(), other.timeoutResponse())
&& Objects.equals(successNextStep(), other.successNextStep())
&& Objects.equals(successConditional(), other.successConditional())
&& Objects.equals(failureNextStep(), other.failureNextStep())
&& Objects.equals(failureConditional(), other.failureConditional())
&& Objects.equals(timeoutNextStep(), other.timeoutNextStep())
&& Objects.equals(timeoutConditional(), other.timeoutConditional());
}
/**
* 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("PostFulfillmentStatusSpecification").add("SuccessResponse", successResponse())
.add("FailureResponse", failureResponse()).add("TimeoutResponse", timeoutResponse())
.add("SuccessNextStep", successNextStep()).add("SuccessConditional", successConditional())
.add("FailureNextStep", failureNextStep()).add("FailureConditional", failureConditional())
.add("TimeoutNextStep", timeoutNextStep()).add("TimeoutConditional", timeoutConditional()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "successResponse":
return Optional.ofNullable(clazz.cast(successResponse()));
case "failureResponse":
return Optional.ofNullable(clazz.cast(failureResponse()));
case "timeoutResponse":
return Optional.ofNullable(clazz.cast(timeoutResponse()));
case "successNextStep":
return Optional.ofNullable(clazz.cast(successNextStep()));
case "successConditional":
return Optional.ofNullable(clazz.cast(successConditional()));
case "failureNextStep":
return Optional.ofNullable(clazz.cast(failureNextStep()));
case "failureConditional":
return Optional.ofNullable(clazz.cast(failureConditional()));
case "timeoutNextStep":
return Optional.ofNullable(clazz.cast(timeoutNextStep()));
case "timeoutConditional":
return Optional.ofNullable(clazz.cast(timeoutConditional()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function