/* * 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.sqs.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* An Amazon SQS message. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Message implements Serializable, Cloneable { /** *
* A unique identifier for the message. A MessageId
is considered unique across all Amazon Web Services
* accounts for an extended period of time.
*
* An identifier associated with the act of receiving the message. A new receipt handle is returned every time you * receive a message. When deleting a message, you provide the last received receipt handle to delete the message. *
*/ private String receiptHandle; /** ** An MD5 digest of the non-URL-encoded message body string. *
*/ private String mD5OfBody; /** ** The message's contents (not URL-encoded). *
*/ private String body; /** *
* A map of the attributes requested in ReceiveMessage
to their respective values. Supported
* attributes:
*
* ApproximateReceiveCount
*
* ApproximateFirstReceiveTimestamp
*
* MessageDeduplicationId
*
* MessageGroupId
*
* SenderId
*
* SentTimestamp
*
* SequenceNumber
*
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an integer
* representing the epoch time in milliseconds.
*
* An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon * SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For * information about MD5, see RFC1321. *
*/ private String mD5OfMessageAttributes; /** *
* Each message attribute consists of a Name
, Type
, and Value
. For more
* information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
*
* A unique identifier for the message. A MessageId
is considered unique across all Amazon Web Services
* accounts for an extended period of time.
*
MessageId
is considered unique across all Amazon Web
* Services accounts for an extended period of time.
*/
public void setMessageId(String messageId) {
this.messageId = messageId;
}
/**
*
* A unique identifier for the message. A MessageId
is considered unique across all Amazon Web Services
* accounts for an extended period of time.
*
MessageId
is considered unique across all Amazon Web
* Services accounts for an extended period of time.
*/
public String getMessageId() {
return this.messageId;
}
/**
*
* A unique identifier for the message. A MessageId
is considered unique across all Amazon Web Services
* accounts for an extended period of time.
*
MessageId
is considered unique across all Amazon Web
* Services accounts for an extended period of time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Message withMessageId(String messageId) {
setMessageId(messageId);
return this;
}
/**
* * An identifier associated with the act of receiving the message. A new receipt handle is returned every time you * receive a message. When deleting a message, you provide the last received receipt handle to delete the message. *
* * @param receiptHandle * An identifier associated with the act of receiving the message. A new receipt handle is returned every * time you receive a message. When deleting a message, you provide the last received receipt handle to * delete the message. */ public void setReceiptHandle(String receiptHandle) { this.receiptHandle = receiptHandle; } /** ** An identifier associated with the act of receiving the message. A new receipt handle is returned every time you * receive a message. When deleting a message, you provide the last received receipt handle to delete the message. *
* * @return An identifier associated with the act of receiving the message. A new receipt handle is returned every * time you receive a message. When deleting a message, you provide the last received receipt handle to * delete the message. */ public String getReceiptHandle() { return this.receiptHandle; } /** ** An identifier associated with the act of receiving the message. A new receipt handle is returned every time you * receive a message. When deleting a message, you provide the last received receipt handle to delete the message. *
* * @param receiptHandle * An identifier associated with the act of receiving the message. A new receipt handle is returned every * time you receive a message. When deleting a message, you provide the last received receipt handle to * delete the message. * @return Returns a reference to this object so that method calls can be chained together. */ public Message withReceiptHandle(String receiptHandle) { setReceiptHandle(receiptHandle); return this; } /** ** An MD5 digest of the non-URL-encoded message body string. *
* * @param mD5OfBody * An MD5 digest of the non-URL-encoded message body string. */ public void setMD5OfBody(String mD5OfBody) { this.mD5OfBody = mD5OfBody; } /** ** An MD5 digest of the non-URL-encoded message body string. *
* * @return An MD5 digest of the non-URL-encoded message body string. */ public String getMD5OfBody() { return this.mD5OfBody; } /** ** An MD5 digest of the non-URL-encoded message body string. *
* * @param mD5OfBody * An MD5 digest of the non-URL-encoded message body string. * @return Returns a reference to this object so that method calls can be chained together. */ public Message withMD5OfBody(String mD5OfBody) { setMD5OfBody(mD5OfBody); return this; } /** ** The message's contents (not URL-encoded). *
* * @param body * The message's contents (not URL-encoded). */ public void setBody(String body) { this.body = body; } /** ** The message's contents (not URL-encoded). *
* * @return The message's contents (not URL-encoded). */ public String getBody() { return this.body; } /** ** The message's contents (not URL-encoded). *
* * @param body * The message's contents (not URL-encoded). * @return Returns a reference to this object so that method calls can be chained together. */ public Message withBody(String body) { setBody(body); return this; } /** *
* A map of the attributes requested in ReceiveMessage
to their respective values. Supported
* attributes:
*
* ApproximateReceiveCount
*
* ApproximateFirstReceiveTimestamp
*
* MessageDeduplicationId
*
* MessageGroupId
*
* SenderId
*
* SentTimestamp
*
* SequenceNumber
*
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an integer
* representing the epoch time in milliseconds.
*
ReceiveMessage
to their respective values.
* Supported attributes:
*
* ApproximateReceiveCount
*
* ApproximateFirstReceiveTimestamp
*
* MessageDeduplicationId
*
* MessageGroupId
*
* SenderId
*
* SentTimestamp
*
* SequenceNumber
*
*
* A map of the attributes requested in
*
*
*
*
*
*
*
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an
* integer representing the epoch time in milliseconds.
*/
public java.util.Map ReceiveMessage
to their respective values. Supported
* attributes:
*
*
* ApproximateReceiveCount
* ApproximateFirstReceiveTimestamp
* MessageDeduplicationId
* MessageGroupId
* SenderId
* SentTimestamp
* SequenceNumber
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an integer
* representing the epoch time in milliseconds.
* ReceiveMessage
to their respective values.
* Supported attributes:
* ApproximateReceiveCount
*
* ApproximateFirstReceiveTimestamp
*
* MessageDeduplicationId
*
* MessageGroupId
*
* SenderId
*
* SentTimestamp
*
* SequenceNumber
*
*
* A map of the attributes requested in
*
*
*
*
*
*
*
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an
* integer representing the epoch time in milliseconds.
*/
public void setAttributes(java.util.Map ReceiveMessage
to their respective values. Supported
* attributes:
*
*
* ApproximateReceiveCount
* ApproximateFirstReceiveTimestamp
* MessageDeduplicationId
* MessageGroupId
* SenderId
* SentTimestamp
* SequenceNumber
* ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an integer
* representing the epoch time in milliseconds.
* ReceiveMessage
to their respective values.
* Supported attributes:
* ApproximateReceiveCount
*
* ApproximateFirstReceiveTimestamp
*
* MessageDeduplicationId
*
* MessageGroupId
*
* SenderId
*
* SentTimestamp
*
* SequenceNumber
*
*
* An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon
* SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For
* information about MD5, see RFC1321.
*
* An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon
* SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For
* information about MD5, see RFC1321.
*
* An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon
* SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For
* information about MD5, see RFC1321.
*
* Each message attribute consists of a
* Each message attribute consists of a
* Each message attribute consists of a ApproximateFirstReceiveTimestamp
and SentTimestamp
are each returned as an
* integer representing the epoch time in milliseconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Message withAttributes(java.util.MapName
, Type
, and Value
. For more
* information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
* Name
, Type
, and Value
. For
* more information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
*/
public java.util.MapName
, Type
, and Value
. For more
* information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
* Name
, Type
, and Value
. For
* more information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
*/
public void setMessageAttributes(java.util.MapName
, Type
, and Value
. For more
* information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
* Name
, Type
, and Value
. For
* more information, see Amazon SQS message attributes in the Amazon SQS Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Message withMessageAttributes(java.util.Map