/* * 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; /** *
* Specifies the audio and DTMF input specification. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AudioAndDTMFInputSpecification implements Serializable, Cloneable, StructuredPojo { /** ** Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is * shared between Audio and DTMF inputs. *
*/ private Integer startTimeoutMs; /** ** Specifies the settings on audio input. *
*/ private AudioSpecification audioSpecification; /** ** Specifies the settings on DTMF input. *
*/ private DTMFSpecification dtmfSpecification; /** ** Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is * shared between Audio and DTMF inputs. *
* * @param startTimeoutMs * Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This * timeout is shared between Audio and DTMF inputs. */ public void setStartTimeoutMs(Integer startTimeoutMs) { this.startTimeoutMs = startTimeoutMs; } /** ** Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is * shared between Audio and DTMF inputs. *
* * @return Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This * timeout is shared between Audio and DTMF inputs. */ public Integer getStartTimeoutMs() { return this.startTimeoutMs; } /** ** Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is * shared between Audio and DTMF inputs. *
* * @param startTimeoutMs * Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This * timeout is shared between Audio and DTMF inputs. * @return Returns a reference to this object so that method calls can be chained together. */ public AudioAndDTMFInputSpecification withStartTimeoutMs(Integer startTimeoutMs) { setStartTimeoutMs(startTimeoutMs); return this; } /** ** Specifies the settings on audio input. *
* * @param audioSpecification * Specifies the settings on audio input. */ public void setAudioSpecification(AudioSpecification audioSpecification) { this.audioSpecification = audioSpecification; } /** ** Specifies the settings on audio input. *
* * @return Specifies the settings on audio input. */ public AudioSpecification getAudioSpecification() { return this.audioSpecification; } /** ** Specifies the settings on audio input. *
* * @param audioSpecification * Specifies the settings on audio input. * @return Returns a reference to this object so that method calls can be chained together. */ public AudioAndDTMFInputSpecification withAudioSpecification(AudioSpecification audioSpecification) { setAudioSpecification(audioSpecification); return this; } /** ** Specifies the settings on DTMF input. *
* * @param dtmfSpecification * Specifies the settings on DTMF input. */ public void setDtmfSpecification(DTMFSpecification dtmfSpecification) { this.dtmfSpecification = dtmfSpecification; } /** ** Specifies the settings on DTMF input. *
* * @return Specifies the settings on DTMF input. */ public DTMFSpecification getDtmfSpecification() { return this.dtmfSpecification; } /** ** Specifies the settings on DTMF input. *
* * @param dtmfSpecification * Specifies the settings on DTMF input. * @return Returns a reference to this object so that method calls can be chained together. */ public AudioAndDTMFInputSpecification withDtmfSpecification(DTMFSpecification dtmfSpecification) { setDtmfSpecification(dtmfSpecification); 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 (getStartTimeoutMs() != null) sb.append("StartTimeoutMs: ").append(getStartTimeoutMs()).append(","); if (getAudioSpecification() != null) sb.append("AudioSpecification: ").append(getAudioSpecification()).append(","); if (getDtmfSpecification() != null) sb.append("DtmfSpecification: ").append(getDtmfSpecification()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AudioAndDTMFInputSpecification == false) return false; AudioAndDTMFInputSpecification other = (AudioAndDTMFInputSpecification) obj; if (other.getStartTimeoutMs() == null ^ this.getStartTimeoutMs() == null) return false; if (other.getStartTimeoutMs() != null && other.getStartTimeoutMs().equals(this.getStartTimeoutMs()) == false) return false; if (other.getAudioSpecification() == null ^ this.getAudioSpecification() == null) return false; if (other.getAudioSpecification() != null && other.getAudioSpecification().equals(this.getAudioSpecification()) == false) return false; if (other.getDtmfSpecification() == null ^ this.getDtmfSpecification() == null) return false; if (other.getDtmfSpecification() != null && other.getDtmfSpecification().equals(this.getDtmfSpecification()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStartTimeoutMs() == null) ? 0 : getStartTimeoutMs().hashCode()); hashCode = prime * hashCode + ((getAudioSpecification() == null) ? 0 : getAudioSpecification().hashCode()); hashCode = prime * hashCode + ((getDtmfSpecification() == null) ? 0 : getDtmfSpecification().hashCode()); return hashCode; } @Override public AudioAndDTMFInputSpecification clone() { try { return (AudioAndDTMFInputSpecification) 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.AudioAndDTMFInputSpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }