/* * Copyright 2010-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.chimesdkmessaging.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* Sends a message to a particular channel that the member is a part of. *

* *

* The x-amz-chime-bearer request header is mandatory. Use the ARN * of the AppInstanceUser or AppInstanceBot that makes * the API call as the value in the header. *

*

* Also, STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*
*/ public class SendChannelMessageRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The ARN of the channel. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
*/ private String channelArn; /** *

* The content of the channel message. *

*

* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
*/ private String content; /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Constraints:
* Allowed Values: STANDARD, CONTROL */ private String type; /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT */ private String persistence; /** *

* The optional metadata for each message. *

*

* Constraints:
* Length: 0 - 1024
* Pattern: .*
*/ private String metadata; /** *

* The Idempotency token for each client request. *

*

* Constraints:
* Length: 2 - 64
* Pattern: [-_a-zA-Z0-9]*
*/ private String clientRequestToken; /** *

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
*/ private String chimeBearer; /** *

* The push notification configuration of the message. *

*/ private PushNotificationConfiguration pushNotification; /** *

* The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences. *

*/ private java.util.Map messageAttributes; /** *

* The ID of the SubChannel in the request. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*/ private String subChannelId; /** *

* The content type of the channel message. *

*

* Constraints:
* Length: 0 - 45
* Pattern: [\s\S]*
*/ private String contentType; /** *

* The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view * targeted messages. Only users who can see targeted messages can take * actions on them. However, administrators can delete targeted messages * that they can’t see. *

*/ private java.util.List target; /** *

* The ARN of the channel. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @return

* The ARN of the channel. *

*/ public String getChannelArn() { return channelArn; } /** *

* The ARN of the channel. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @param channelArn

* The ARN of the channel. *

*/ public void setChannelArn(String channelArn) { this.channelArn = channelArn; } /** *

* The ARN of the channel. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @param channelArn

* The ARN of the channel. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withChannelArn(String channelArn) { this.channelArn = channelArn; return this; } /** *

* The content of the channel message. *

*

* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
* * @return

* The content of the channel message. *

*/ public String getContent() { return content; } /** *

* The content of the channel message. *

*

* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
* * @param content

* The content of the channel message. *

*/ public void setContent(String content) { this.content = content; } /** *

* The content of the channel message. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
* * @param content

* The content of the channel message. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withContent(String content) { this.content = content; return this; } /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Constraints:
* Allowed Values: STANDARD, CONTROL * * @return

* The type of message, STANDARD or * CONTROL. *

*

* STANDARD messages can be up to 4KB in size and * contain metadata. Metadata is arbitrary, and you can use it in a * variety of ways, such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not * contain metadata. *

* @see ChannelMessageType */ public String getType() { return type; } /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Constraints:
* Allowed Values: STANDARD, CONTROL * * @param type

* The type of message, STANDARD or * CONTROL. *

*

* STANDARD messages can be up to 4KB in size and * contain metadata. Metadata is arbitrary, and you can use it in * a variety of ways, such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do * not contain metadata. *

* @see ChannelMessageType */ public void setType(String type) { this.type = type; } /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: STANDARD, CONTROL * * @param type

* The type of message, STANDARD or * CONTROL. *

*

* STANDARD messages can be up to 4KB in size and * contain metadata. Metadata is arbitrary, and you can use it in * a variety of ways, such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do * not contain metadata. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelMessageType */ public SendChannelMessageRequest withType(String type) { this.type = type; return this; } /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Constraints:
* Allowed Values: STANDARD, CONTROL * * @param type

* The type of message, STANDARD or * CONTROL. *

*

* STANDARD messages can be up to 4KB in size and * contain metadata. Metadata is arbitrary, and you can use it in * a variety of ways, such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do * not contain metadata. *

* @see ChannelMessageType */ public void setType(ChannelMessageType type) { this.type = type.toString(); } /** *

* The type of message, STANDARD or CONTROL. *

*

* STANDARD messages can be up to 4KB in size and contain * metadata. Metadata is arbitrary, and you can use it in a variety of ways, * such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do not contain * metadata. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: STANDARD, CONTROL * * @param type

* The type of message, STANDARD or * CONTROL. *

*

* STANDARD messages can be up to 4KB in size and * contain metadata. Metadata is arbitrary, and you can use it in * a variety of ways, such as containing a link to an attachment. *

*

* CONTROL messages are limited to 30 bytes and do * not contain metadata. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelMessageType */ public SendChannelMessageRequest withType(ChannelMessageType type) { this.type = type.toString(); return this; } /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT * * @return

* Boolean that controls whether the message is persisted on the * back end. Required. *

* @see ChannelMessagePersistenceType */ public String getPersistence() { return persistence; } /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT * * @param persistence

* Boolean that controls whether the message is persisted on the * back end. Required. *

* @see ChannelMessagePersistenceType */ public void setPersistence(String persistence) { this.persistence = persistence; } /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT * * @param persistence

* Boolean that controls whether the message is persisted on the * back end. Required. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelMessagePersistenceType */ public SendChannelMessageRequest withPersistence(String persistence) { this.persistence = persistence; return this; } /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT * * @param persistence

* Boolean that controls whether the message is persisted on the * back end. Required. *

* @see ChannelMessagePersistenceType */ public void setPersistence(ChannelMessagePersistenceType persistence) { this.persistence = persistence.toString(); } /** *

* Boolean that controls whether the message is persisted on the back end. * Required. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PERSISTENT, NON_PERSISTENT * * @param persistence

* Boolean that controls whether the message is persisted on the * back end. Required. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ChannelMessagePersistenceType */ public SendChannelMessageRequest withPersistence(ChannelMessagePersistenceType persistence) { this.persistence = persistence.toString(); return this; } /** *

* The optional metadata for each message. *

*

* Constraints:
* Length: 0 - 1024
* Pattern: .*
* * @return

* The optional metadata for each message. *

*/ public String getMetadata() { return metadata; } /** *

* The optional metadata for each message. *

*

* Constraints:
* Length: 0 - 1024
* Pattern: .*
* * @param metadata

* The optional metadata for each message. *

*/ public void setMetadata(String metadata) { this.metadata = metadata; } /** *

* The optional metadata for each message. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 0 - 1024
* Pattern: .*
* * @param metadata

* The optional metadata for each message. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withMetadata(String metadata) { this.metadata = metadata; return this; } /** *

* The Idempotency token for each client request. *

*

* Constraints:
* Length: 2 - 64
* Pattern: [-_a-zA-Z0-9]*
* * @return

* The Idempotency token for each client request. *

*/ public String getClientRequestToken() { return clientRequestToken; } /** *

* The Idempotency token for each client request. *

*

* Constraints:
* Length: 2 - 64
* Pattern: [-_a-zA-Z0-9]*
* * @param clientRequestToken

* The Idempotency token for each client request. *

*/ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* The Idempotency token for each client request. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 2 - 64
* Pattern: [-_a-zA-Z0-9]*
* * @param clientRequestToken

* The Idempotency token for each client request. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; return this; } /** *

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @return

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*/ public String getChimeBearer() { return chimeBearer; } /** *

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @param chimeBearer

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*/ public void setChimeBearer(String chimeBearer) { this.chimeBearer = chimeBearer; } /** *

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 5 - 1600
* Pattern: * arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}: * [a-z0-9-\.]{0,63}:[^/].{0,1023}
* * @param chimeBearer

* The ARN of the AppInstanceUser or * AppInstanceBot that makes the API call. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withChimeBearer(String chimeBearer) { this.chimeBearer = chimeBearer; return this; } /** *

* The push notification configuration of the message. *

* * @return

* The push notification configuration of the message. *

*/ public PushNotificationConfiguration getPushNotification() { return pushNotification; } /** *

* The push notification configuration of the message. *

* * @param pushNotification

* The push notification configuration of the message. *

*/ public void setPushNotification(PushNotificationConfiguration pushNotification) { this.pushNotification = pushNotification; } /** *

* The push notification configuration of the message. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param pushNotification

* The push notification configuration of the message. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withPushNotification( PushNotificationConfiguration pushNotification) { this.pushNotification = pushNotification; return this; } /** *

* The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences. *

* * @return

* The attributes for the message, used for message filtering along * with a FilterRule defined in the * PushNotificationPreferences. *

*/ public java.util.Map getMessageAttributes() { return messageAttributes; } /** *

* The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences. *

* * @param messageAttributes

* The attributes for the message, used for message filtering * along with a FilterRule defined in the * PushNotificationPreferences. *

*/ public void setMessageAttributes(java.util.Map messageAttributes) { this.messageAttributes = messageAttributes; } /** *

* The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param messageAttributes

* The attributes for the message, used for message filtering * along with a FilterRule defined in the * PushNotificationPreferences. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withMessageAttributes( java.util.Map messageAttributes) { this.messageAttributes = messageAttributes; return this; } /** *

* The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences. *

*

* The method adds a new key-value pair into MessageAttributes parameter, * and returns a reference to this object so that method calls can be * chained together. * * @param key The key of the entry to be added into MessageAttributes. * @param value The corresponding value of the entry to be added into * MessageAttributes. * @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest addMessageAttributesEntry(String key, MessageAttributeValue value) { if (null == this.messageAttributes) { this.messageAttributes = new java.util.HashMap(); } if (this.messageAttributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.messageAttributes.put(key, value); return this; } /** * Removes all the entries added into MessageAttributes. *

* Returns a reference to this object so that method calls can be chained * together. */ public SendChannelMessageRequest clearMessageAttributesEntries() { this.messageAttributes = null; return this; } /** *

* The ID of the SubChannel in the request. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
* * @return

* The ID of the SubChannel in the request. *

*/ public String getSubChannelId() { return subChannelId; } /** *

* The ID of the SubChannel in the request. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
* * @param subChannelId

* The ID of the SubChannel in the request. *

*/ public void setSubChannelId(String subChannelId) { this.subChannelId = subChannelId; } /** *

* The ID of the SubChannel in the request. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
* * @param subChannelId

* The ID of the SubChannel in the request. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withSubChannelId(String subChannelId) { this.subChannelId = subChannelId; return this; } /** *

* The content type of the channel message. *

*

* Constraints:
* Length: 0 - 45
* Pattern: [\s\S]*
* * @return

* The content type of the channel message. *

*/ public String getContentType() { return contentType; } /** *

* The content type of the channel message. *

*

* Constraints:
* Length: 0 - 45
* Pattern: [\s\S]*
* * @param contentType

* The content type of the channel message. *

*/ public void setContentType(String contentType) { this.contentType = contentType; } /** *

* The content type of the channel message. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 0 - 45
* Pattern: [\s\S]*
* * @param contentType

* The content type of the channel message. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withContentType(String contentType) { this.contentType = contentType; return this; } /** *

* The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view * targeted messages. Only users who can see targeted messages can take * actions on them. However, administrators can delete targeted messages * that they can’t see. *

* * @return

* The target of a message. Must be a member of the channel, such as * another user, a bot, or the sender. Only the target and the * sender can view targeted messages. Only users who can see * targeted messages can take actions on them. However, * administrators can delete targeted messages that they can’t see. *

*/ public java.util.List getTarget() { return target; } /** *

* The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view * targeted messages. Only users who can see targeted messages can take * actions on them. However, administrators can delete targeted messages * that they can’t see. *

* * @param target

* The target of a message. Must be a member of the channel, such * as another user, a bot, or the sender. Only the target and the * sender can view targeted messages. Only users who can see * targeted messages can take actions on them. However, * administrators can delete targeted messages that they can’t * see. *

*/ public void setTarget(java.util.Collection target) { if (target == null) { this.target = null; return; } this.target = new java.util.ArrayList(target); } /** *

* The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view * targeted messages. Only users who can see targeted messages can take * actions on them. However, administrators can delete targeted messages * that they can’t see. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param target

* The target of a message. Must be a member of the channel, such * as another user, a bot, or the sender. Only the target and the * sender can view targeted messages. Only users who can see * targeted messages can take actions on them. However, * administrators can delete targeted messages that they can’t * see. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withTarget(Target... target) { if (getTarget() == null) { this.target = new java.util.ArrayList(target.length); } for (Target value : target) { this.target.add(value); } return this; } /** *

* The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view * targeted messages. Only users who can see targeted messages can take * actions on them. However, administrators can delete targeted messages * that they can’t see. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param target

* The target of a message. Must be a member of the channel, such * as another user, a bot, or the sender. Only the target and the * sender can view targeted messages. Only users who can see * targeted messages can take actions on them. However, * administrators can delete targeted messages that they can’t * see. *

* @return A reference to this updated object so that method calls can be * chained together. */ public SendChannelMessageRequest withTarget(java.util.Collection target) { setTarget(target); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getChannelArn() != null) sb.append("ChannelArn: " + getChannelArn() + ","); if (getContent() != null) sb.append("Content: " + getContent() + ","); if (getType() != null) sb.append("Type: " + getType() + ","); if (getPersistence() != null) sb.append("Persistence: " + getPersistence() + ","); if (getMetadata() != null) sb.append("Metadata: " + getMetadata() + ","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: " + getClientRequestToken() + ","); if (getChimeBearer() != null) sb.append("ChimeBearer: " + getChimeBearer() + ","); if (getPushNotification() != null) sb.append("PushNotification: " + getPushNotification() + ","); if (getMessageAttributes() != null) sb.append("MessageAttributes: " + getMessageAttributes() + ","); if (getSubChannelId() != null) sb.append("SubChannelId: " + getSubChannelId() + ","); if (getContentType() != null) sb.append("ContentType: " + getContentType() + ","); if (getTarget() != null) sb.append("Target: " + getTarget()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChannelArn() == null) ? 0 : getChannelArn().hashCode()); hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getPersistence() == null) ? 0 : getPersistence().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getChimeBearer() == null) ? 0 : getChimeBearer().hashCode()); hashCode = prime * hashCode + ((getPushNotification() == null) ? 0 : getPushNotification().hashCode()); hashCode = prime * hashCode + ((getMessageAttributes() == null) ? 0 : getMessageAttributes().hashCode()); hashCode = prime * hashCode + ((getSubChannelId() == null) ? 0 : getSubChannelId().hashCode()); hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SendChannelMessageRequest == false) return false; SendChannelMessageRequest other = (SendChannelMessageRequest) obj; if (other.getChannelArn() == null ^ this.getChannelArn() == null) return false; if (other.getChannelArn() != null && other.getChannelArn().equals(this.getChannelArn()) == false) return false; if (other.getContent() == null ^ this.getContent() == null) return false; if (other.getContent() != null && other.getContent().equals(this.getContent()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getPersistence() == null ^ this.getPersistence() == null) return false; if (other.getPersistence() != null && other.getPersistence().equals(this.getPersistence()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getChimeBearer() == null ^ this.getChimeBearer() == null) return false; if (other.getChimeBearer() != null && other.getChimeBearer().equals(this.getChimeBearer()) == false) return false; if (other.getPushNotification() == null ^ this.getPushNotification() == null) return false; if (other.getPushNotification() != null && other.getPushNotification().equals(this.getPushNotification()) == false) return false; if (other.getMessageAttributes() == null ^ this.getMessageAttributes() == null) return false; if (other.getMessageAttributes() != null && other.getMessageAttributes().equals(this.getMessageAttributes()) == false) return false; if (other.getSubChannelId() == null ^ this.getSubChannelId() == null) return false; if (other.getSubChannelId() != null && other.getSubChannelId().equals(this.getSubChannelId()) == false) return false; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getTarget() == null ^ this.getTarget() == null) return false; if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false) return false; return true; } }