(matchingEventTypes);
}
/**
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setMatchingEventTypes(java.util.Collection)} or {@link #withMatchingEventTypes(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param matchingEventTypes
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventType
*/
public EventDestinationDefinition withMatchingEventTypes(String... matchingEventTypes) {
if (this.matchingEventTypes == null) {
setMatchingEventTypes(new java.util.ArrayList(matchingEventTypes.length));
}
for (String ele : matchingEventTypes) {
this.matchingEventTypes.add(ele);
}
return this;
}
/**
* @param matchingEventTypes
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventType
*/
public EventDestinationDefinition withMatchingEventTypes(java.util.Collection matchingEventTypes) {
setMatchingEventTypes(matchingEventTypes);
return this;
}
/**
* @param matchingEventTypes
* @return Returns a reference to this object so that method calls can be chained together.
* @see EventType
*/
public EventDestinationDefinition withMatchingEventTypes(EventType... matchingEventTypes) {
java.util.ArrayList matchingEventTypesCopy = new java.util.ArrayList(matchingEventTypes.length);
for (EventType value : matchingEventTypes) {
matchingEventTypesCopy.add(value.toString());
}
if (getMatchingEventTypes() == null) {
setMatchingEventTypes(matchingEventTypesCopy);
} else {
getMatchingEventTypes().addAll(matchingEventTypesCopy);
}
return this;
}
/**
* @param snsDestination
*/
public void setSnsDestination(SnsDestination snsDestination) {
this.snsDestination = snsDestination;
}
/**
* @return
*/
public SnsDestination getSnsDestination() {
return this.snsDestination;
}
/**
* @param snsDestination
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EventDestinationDefinition withSnsDestination(SnsDestination snsDestination) {
setSnsDestination(snsDestination);
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 (getCloudWatchLogsDestination() != null)
sb.append("CloudWatchLogsDestination: ").append(getCloudWatchLogsDestination()).append(",");
if (getEnabled() != null)
sb.append("Enabled: ").append(getEnabled()).append(",");
if (getKinesisFirehoseDestination() != null)
sb.append("KinesisFirehoseDestination: ").append(getKinesisFirehoseDestination()).append(",");
if (getMatchingEventTypes() != null)
sb.append("MatchingEventTypes: ").append(getMatchingEventTypes()).append(",");
if (getSnsDestination() != null)
sb.append("SnsDestination: ").append(getSnsDestination());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EventDestinationDefinition == false)
return false;
EventDestinationDefinition other = (EventDestinationDefinition) obj;
if (other.getCloudWatchLogsDestination() == null ^ this.getCloudWatchLogsDestination() == null)
return false;
if (other.getCloudWatchLogsDestination() != null && other.getCloudWatchLogsDestination().equals(this.getCloudWatchLogsDestination()) == false)
return false;
if (other.getEnabled() == null ^ this.getEnabled() == null)
return false;
if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
return false;
if (other.getKinesisFirehoseDestination() == null ^ this.getKinesisFirehoseDestination() == null)
return false;
if (other.getKinesisFirehoseDestination() != null && other.getKinesisFirehoseDestination().equals(this.getKinesisFirehoseDestination()) == false)
return false;
if (other.getMatchingEventTypes() == null ^ this.getMatchingEventTypes() == null)
return false;
if (other.getMatchingEventTypes() != null && other.getMatchingEventTypes().equals(this.getMatchingEventTypes()) == false)
return false;
if (other.getSnsDestination() == null ^ this.getSnsDestination() == null)
return false;
if (other.getSnsDestination() != null && other.getSnsDestination().equals(this.getSnsDestination()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCloudWatchLogsDestination() == null) ? 0 : getCloudWatchLogsDestination().hashCode());
hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
hashCode = prime * hashCode + ((getKinesisFirehoseDestination() == null) ? 0 : getKinesisFirehoseDestination().hashCode());
hashCode = prime * hashCode + ((getMatchingEventTypes() == null) ? 0 : getMatchingEventTypes().hashCode());
hashCode = prime * hashCode + ((getSnsDestination() == null) ? 0 : getSnsDestination().hashCode());
return hashCode;
}
@Override
public EventDestinationDefinition clone() {
try {
return (EventDestinationDefinition) 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.pinpointsmsvoice.model.transform.EventDestinationDefinitionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}