com.amazonaws.services.lexmodelbuilding.model.UtteranceData Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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.lexmodelbuilding.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides information about a single utterance that was made to your bot.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UtteranceData implements Serializable, Cloneable, StructuredPojo {
/**
*
* The text that was entered by the user or the text representation of an audio clip.
*
*/
private String utteranceString;
/**
*
* The number of times that the utterance was processed.
*
*/
private Integer count;
/**
*
* The total number of individuals that used the utterance.
*
*/
private Integer distinctUsers;
/**
*
* The date that the utterance was first recorded.
*
*/
private java.util.Date firstUtteredDate;
/**
*
* The date that the utterance was last recorded.
*
*/
private java.util.Date lastUtteredDate;
/**
*
* The text that was entered by the user or the text representation of an audio clip.
*
*
* @param utteranceString
* The text that was entered by the user or the text representation of an audio clip.
*/
public void setUtteranceString(String utteranceString) {
this.utteranceString = utteranceString;
}
/**
*
* The text that was entered by the user or the text representation of an audio clip.
*
*
* @return The text that was entered by the user or the text representation of an audio clip.
*/
public String getUtteranceString() {
return this.utteranceString;
}
/**
*
* The text that was entered by the user or the text representation of an audio clip.
*
*
* @param utteranceString
* The text that was entered by the user or the text representation of an audio clip.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UtteranceData withUtteranceString(String utteranceString) {
setUtteranceString(utteranceString);
return this;
}
/**
*
* The number of times that the utterance was processed.
*
*
* @param count
* The number of times that the utterance was processed.
*/
public void setCount(Integer count) {
this.count = count;
}
/**
*
* The number of times that the utterance was processed.
*
*
* @return The number of times that the utterance was processed.
*/
public Integer getCount() {
return this.count;
}
/**
*
* The number of times that the utterance was processed.
*
*
* @param count
* The number of times that the utterance was processed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UtteranceData withCount(Integer count) {
setCount(count);
return this;
}
/**
*
* The total number of individuals that used the utterance.
*
*
* @param distinctUsers
* The total number of individuals that used the utterance.
*/
public void setDistinctUsers(Integer distinctUsers) {
this.distinctUsers = distinctUsers;
}
/**
*
* The total number of individuals that used the utterance.
*
*
* @return The total number of individuals that used the utterance.
*/
public Integer getDistinctUsers() {
return this.distinctUsers;
}
/**
*
* The total number of individuals that used the utterance.
*
*
* @param distinctUsers
* The total number of individuals that used the utterance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UtteranceData withDistinctUsers(Integer distinctUsers) {
setDistinctUsers(distinctUsers);
return this;
}
/**
*
* The date that the utterance was first recorded.
*
*
* @param firstUtteredDate
* The date that the utterance was first recorded.
*/
public void setFirstUtteredDate(java.util.Date firstUtteredDate) {
this.firstUtteredDate = firstUtteredDate;
}
/**
*
* The date that the utterance was first recorded.
*
*
* @return The date that the utterance was first recorded.
*/
public java.util.Date getFirstUtteredDate() {
return this.firstUtteredDate;
}
/**
*
* The date that the utterance was first recorded.
*
*
* @param firstUtteredDate
* The date that the utterance was first recorded.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UtteranceData withFirstUtteredDate(java.util.Date firstUtteredDate) {
setFirstUtteredDate(firstUtteredDate);
return this;
}
/**
*
* The date that the utterance was last recorded.
*
*
* @param lastUtteredDate
* The date that the utterance was last recorded.
*/
public void setLastUtteredDate(java.util.Date lastUtteredDate) {
this.lastUtteredDate = lastUtteredDate;
}
/**
*
* The date that the utterance was last recorded.
*
*
* @return The date that the utterance was last recorded.
*/
public java.util.Date getLastUtteredDate() {
return this.lastUtteredDate;
}
/**
*
* The date that the utterance was last recorded.
*
*
* @param lastUtteredDate
* The date that the utterance was last recorded.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UtteranceData withLastUtteredDate(java.util.Date lastUtteredDate) {
setLastUtteredDate(lastUtteredDate);
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 (getUtteranceString() != null)
sb.append("UtteranceString: ").append(getUtteranceString()).append(",");
if (getCount() != null)
sb.append("Count: ").append(getCount()).append(",");
if (getDistinctUsers() != null)
sb.append("DistinctUsers: ").append(getDistinctUsers()).append(",");
if (getFirstUtteredDate() != null)
sb.append("FirstUtteredDate: ").append(getFirstUtteredDate()).append(",");
if (getLastUtteredDate() != null)
sb.append("LastUtteredDate: ").append(getLastUtteredDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UtteranceData == false)
return false;
UtteranceData other = (UtteranceData) obj;
if (other.getUtteranceString() == null ^ this.getUtteranceString() == null)
return false;
if (other.getUtteranceString() != null && other.getUtteranceString().equals(this.getUtteranceString()) == false)
return false;
if (other.getCount() == null ^ this.getCount() == null)
return false;
if (other.getCount() != null && other.getCount().equals(this.getCount()) == false)
return false;
if (other.getDistinctUsers() == null ^ this.getDistinctUsers() == null)
return false;
if (other.getDistinctUsers() != null && other.getDistinctUsers().equals(this.getDistinctUsers()) == false)
return false;
if (other.getFirstUtteredDate() == null ^ this.getFirstUtteredDate() == null)
return false;
if (other.getFirstUtteredDate() != null && other.getFirstUtteredDate().equals(this.getFirstUtteredDate()) == false)
return false;
if (other.getLastUtteredDate() == null ^ this.getLastUtteredDate() == null)
return false;
if (other.getLastUtteredDate() != null && other.getLastUtteredDate().equals(this.getLastUtteredDate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getUtteranceString() == null) ? 0 : getUtteranceString().hashCode());
hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode());
hashCode = prime * hashCode + ((getDistinctUsers() == null) ? 0 : getDistinctUsers().hashCode());
hashCode = prime * hashCode + ((getFirstUtteredDate() == null) ? 0 : getFirstUtteredDate().hashCode());
hashCode = prime * hashCode + ((getLastUtteredDate() == null) ? 0 : getLastUtteredDate().hashCode());
return hashCode;
}
@Override
public UtteranceData clone() {
try {
return (UtteranceData) 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.lexmodelbuilding.model.transform.UtteranceDataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}