/* * Copyright 2018-2023 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 com.amazonaws.services.lexmodelsv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provides information for updating the user on the progress of fulfilling an intent. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FulfillmentUpdatesSpecification implements Serializable, Cloneable, StructuredPojo { /** *

* Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. *

*

* If the active field is set to true, the startResponse, updateResponse, and * timeoutInSeconds fields are required. *

*/ private Boolean active; /** *

* Provides configuration information for the message sent to users when the fulfillment Lambda functions starts * running. *

*/ private FulfillmentStartResponseSpecification startResponse; /** *

* Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. *

*/ private FulfillmentUpdateResponseSpecification updateResponse; /** *

* The length of time that the fulfillment Lambda function should run before it times out. *

*/ private Integer timeoutInSeconds; /** *

* Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. *

*

* If the active field is set to true, the startResponse, updateResponse, and * timeoutInSeconds fields are required. *

* * @param active * Determines whether fulfillment updates are sent to the user. When this field is true, updates are * sent.

*

* If the active field is set to true, the startResponse, * updateResponse, and timeoutInSeconds fields are required. */ public void setActive(Boolean active) { this.active = active; } /** *

* Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. *

*

* If the active field is set to true, the startResponse, updateResponse, and * timeoutInSeconds fields are required. *

* * @return Determines whether fulfillment updates are sent to the user. When this field is true, updates are * sent.

*

* If the active field is set to true, the startResponse, * updateResponse, and timeoutInSeconds fields are required. */ public Boolean getActive() { return this.active; } /** *

* Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. *

*

* If the active field is set to true, the startResponse, updateResponse, and * timeoutInSeconds fields are required. *

* * @param active * Determines whether fulfillment updates are sent to the user. When this field is true, updates are * sent.

*

* If the active field is set to true, the startResponse, * updateResponse, and timeoutInSeconds fields are required. * @return Returns a reference to this object so that method calls can be chained together. */ public FulfillmentUpdatesSpecification withActive(Boolean active) { setActive(active); return this; } /** *

* Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. *

*

* If the active field is set to true, the startResponse, updateResponse, and * timeoutInSeconds fields are required. *

* * @return Determines whether fulfillment updates are sent to the user. When this field is true, updates are * sent.

*

* If the active field is set to true, the startResponse, * updateResponse, and timeoutInSeconds fields are required. */ public Boolean isActive() { return this.active; } /** *

* Provides configuration information for the message sent to users when the fulfillment Lambda functions starts * running. *

* * @param startResponse * Provides configuration information for the message sent to users when the fulfillment Lambda functions * starts running. */ public void setStartResponse(FulfillmentStartResponseSpecification startResponse) { this.startResponse = startResponse; } /** *

* Provides configuration information for the message sent to users when the fulfillment Lambda functions starts * running. *

* * @return Provides configuration information for the message sent to users when the fulfillment Lambda functions * starts running. */ public FulfillmentStartResponseSpecification getStartResponse() { return this.startResponse; } /** *

* Provides configuration information for the message sent to users when the fulfillment Lambda functions starts * running. *

* * @param startResponse * Provides configuration information for the message sent to users when the fulfillment Lambda functions * starts running. * @return Returns a reference to this object so that method calls can be chained together. */ public FulfillmentUpdatesSpecification withStartResponse(FulfillmentStartResponseSpecification startResponse) { setStartResponse(startResponse); return this; } /** *

* Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. *

* * @param updateResponse * Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. */ public void setUpdateResponse(FulfillmentUpdateResponseSpecification updateResponse) { this.updateResponse = updateResponse; } /** *

* Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. *

* * @return Provides configuration information for messages sent periodically to the user while the fulfillment * Lambda function is running. */ public FulfillmentUpdateResponseSpecification getUpdateResponse() { return this.updateResponse; } /** *

* Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. *

* * @param updateResponse * Provides configuration information for messages sent periodically to the user while the fulfillment Lambda * function is running. * @return Returns a reference to this object so that method calls can be chained together. */ public FulfillmentUpdatesSpecification withUpdateResponse(FulfillmentUpdateResponseSpecification updateResponse) { setUpdateResponse(updateResponse); return this; } /** *

* The length of time that the fulfillment Lambda function should run before it times out. *

* * @param timeoutInSeconds * The length of time that the fulfillment Lambda function should run before it times out. */ public void setTimeoutInSeconds(Integer timeoutInSeconds) { this.timeoutInSeconds = timeoutInSeconds; } /** *

* The length of time that the fulfillment Lambda function should run before it times out. *

* * @return The length of time that the fulfillment Lambda function should run before it times out. */ public Integer getTimeoutInSeconds() { return this.timeoutInSeconds; } /** *

* The length of time that the fulfillment Lambda function should run before it times out. *

* * @param timeoutInSeconds * The length of time that the fulfillment Lambda function should run before it times out. * @return Returns a reference to this object so that method calls can be chained together. */ public FulfillmentUpdatesSpecification withTimeoutInSeconds(Integer timeoutInSeconds) { setTimeoutInSeconds(timeoutInSeconds); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getActive() != null) sb.append("Active: ").append(getActive()).append(","); if (getStartResponse() != null) sb.append("StartResponse: ").append(getStartResponse()).append(","); if (getUpdateResponse() != null) sb.append("UpdateResponse: ").append(getUpdateResponse()).append(","); if (getTimeoutInSeconds() != null) sb.append("TimeoutInSeconds: ").append(getTimeoutInSeconds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FulfillmentUpdatesSpecification == false) return false; FulfillmentUpdatesSpecification other = (FulfillmentUpdatesSpecification) obj; if (other.getActive() == null ^ this.getActive() == null) return false; if (other.getActive() != null && other.getActive().equals(this.getActive()) == false) return false; if (other.getStartResponse() == null ^ this.getStartResponse() == null) return false; if (other.getStartResponse() != null && other.getStartResponse().equals(this.getStartResponse()) == false) return false; if (other.getUpdateResponse() == null ^ this.getUpdateResponse() == null) return false; if (other.getUpdateResponse() != null && other.getUpdateResponse().equals(this.getUpdateResponse()) == false) return false; if (other.getTimeoutInSeconds() == null ^ this.getTimeoutInSeconds() == null) return false; if (other.getTimeoutInSeconds() != null && other.getTimeoutInSeconds().equals(this.getTimeoutInSeconds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActive() == null) ? 0 : getActive().hashCode()); hashCode = prime * hashCode + ((getStartResponse() == null) ? 0 : getStartResponse().hashCode()); hashCode = prime * hashCode + ((getUpdateResponse() == null) ? 0 : getUpdateResponse().hashCode()); hashCode = prime * hashCode + ((getTimeoutInSeconds() == null) ? 0 : getTimeoutInSeconds().hashCode()); return hashCode; } @Override public FulfillmentUpdatesSpecification clone() { try { return (FulfillmentUpdatesSpecification) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lexmodelsv2.model.transform.FulfillmentUpdatesSpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }