com.amazonaws.services.connectcases.model.ContactContent Maven / Gradle / Ivy
Show all versions of aws-java-sdk-connectcases Show documentation
/*
* Copyright 2019-2024 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.connectcases.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An object that represents a content of an Amazon Connect contact object.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ContactContent implements Serializable, Cloneable, StructuredPojo {
/**
*
* A list of channels to filter on for related items of type Contact
.
*
*/
private String channel;
/**
*
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of the
* contact.
*
*/
private java.util.Date connectedToSystemTime;
/**
*
* A unique identifier of a contact in Amazon Connect.
*
*/
private String contactArn;
/**
*
* A list of channels to filter on for related items of type Contact
.
*
*
* @param channel
* A list of channels to filter on for related items of type Contact
.
*/
public void setChannel(String channel) {
this.channel = channel;
}
/**
*
* A list of channels to filter on for related items of type Contact
.
*
*
* @return A list of channels to filter on for related items of type Contact
.
*/
public String getChannel() {
return this.channel;
}
/**
*
* A list of channels to filter on for related items of type Contact
.
*
*
* @param channel
* A list of channels to filter on for related items of type Contact
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContactContent withChannel(String channel) {
setChannel(channel);
return this;
}
/**
*
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of the
* contact.
*
*
* @param connectedToSystemTime
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of
* the contact.
*/
public void setConnectedToSystemTime(java.util.Date connectedToSystemTime) {
this.connectedToSystemTime = connectedToSystemTime;
}
/**
*
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of the
* contact.
*
*
* @return The difference between the InitiationTimestamp
and the DisconnectTimestamp
of
* the contact.
*/
public java.util.Date getConnectedToSystemTime() {
return this.connectedToSystemTime;
}
/**
*
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of the
* contact.
*
*
* @param connectedToSystemTime
* The difference between the InitiationTimestamp
and the DisconnectTimestamp
of
* the contact.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContactContent withConnectedToSystemTime(java.util.Date connectedToSystemTime) {
setConnectedToSystemTime(connectedToSystemTime);
return this;
}
/**
*
* A unique identifier of a contact in Amazon Connect.
*
*
* @param contactArn
* A unique identifier of a contact in Amazon Connect.
*/
public void setContactArn(String contactArn) {
this.contactArn = contactArn;
}
/**
*
* A unique identifier of a contact in Amazon Connect.
*
*
* @return A unique identifier of a contact in Amazon Connect.
*/
public String getContactArn() {
return this.contactArn;
}
/**
*
* A unique identifier of a contact in Amazon Connect.
*
*
* @param contactArn
* A unique identifier of a contact in Amazon Connect.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContactContent withContactArn(String contactArn) {
setContactArn(contactArn);
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 (getChannel() != null)
sb.append("Channel: ").append(getChannel()).append(",");
if (getConnectedToSystemTime() != null)
sb.append("ConnectedToSystemTime: ").append(getConnectedToSystemTime()).append(",");
if (getContactArn() != null)
sb.append("ContactArn: ").append(getContactArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ContactContent == false)
return false;
ContactContent other = (ContactContent) obj;
if (other.getChannel() == null ^ this.getChannel() == null)
return false;
if (other.getChannel() != null && other.getChannel().equals(this.getChannel()) == false)
return false;
if (other.getConnectedToSystemTime() == null ^ this.getConnectedToSystemTime() == null)
return false;
if (other.getConnectedToSystemTime() != null && other.getConnectedToSystemTime().equals(this.getConnectedToSystemTime()) == false)
return false;
if (other.getContactArn() == null ^ this.getContactArn() == null)
return false;
if (other.getContactArn() != null && other.getContactArn().equals(this.getContactArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getChannel() == null) ? 0 : getChannel().hashCode());
hashCode = prime * hashCode + ((getConnectedToSystemTime() == null) ? 0 : getConnectedToSystemTime().hashCode());
hashCode = prime * hashCode + ((getContactArn() == null) ? 0 : getContactArn().hashCode());
return hashCode;
}
@Override
public ContactContent clone() {
try {
return (ContactContent) 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.connectcases.model.transform.ContactContentMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}