Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the ReceiveMessage operation.

Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue. Long poll support is enabled by using the WaitTimeSeconds parameter. For more information, see Amazon SQS Long Poll in the Amazon SQS Developer Guide .

Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. This means only the messages on the sampled machines are returned. If the number of messages in the queue is small (less than 1000), it is likely you will get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response; in which case you should repeat the request.

For each message returned, the response includes the following:

  • Message body

  • MD5 digest of the message body. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html .

  • Message ID you received when you sent the message to the queue.

  • Receipt handle.

  • Message attributes.

  • MD5 digest of the message attributes.

The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide .

You can provide the VisibilityTimeout parameter in your request, which will be applied to the messages that Amazon SQS returns in the response. If you do not include the parameter, the overall visibility timeout for the queue is used for the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer Guide .

NOTE: Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

 
public class ReceiveMessageRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The URL of the Amazon SQS queue to take action on.
    private String queueUrl;

    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

    private Integer maxNumberOfMessages;

    
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
    private Integer visibilityTimeout;

    
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
    private Integer waitTimeSeconds;

    
Default constructor for a new ReceiveMessageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
    public ReceiveMessageRequest() {}
    
    
Constructs a new ReceiveMessageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
queueUrl The URL of the Amazon SQS queue to take action on.
    public ReceiveMessageRequest(String queueUrl) {
        setQueueUrl(queueUrl);
    }

    
The URL of the Amazon SQS queue to take action on.

Returns:
The URL of the Amazon SQS queue to take action on.
    public String getQueueUrl() {
        return ;
    }
    
    
The URL of the Amazon SQS queue to take action on.

Parameters:
queueUrl The URL of the Amazon SQS queue to take action on.
    public void setQueueUrl(String queueUrl) {
        this. = queueUrl;
    }
    
    
The URL of the Amazon SQS queue to take action on.

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

Parameters:
queueUrl The URL of the Amazon SQS queue to take action on.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withQueueUrl(String queueUrl) {
        this. = queueUrl;
        return this;
    }

    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).

Returns:
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
    public java.util.List<StringgetAttributeNames() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).

Parameters:
attributeNames A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
    public void setAttributeNames(java.util.Collection<StringattributeNames) {
        if (attributeNames == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringattributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(attributeNames.size());
        attributeNamesCopy.addAll(attributeNames);
        this. = attributeNamesCopy;
    }
    
    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).

NOTE: This method appends the values to the existing list (if any). Use setAttributeNames(java.util.Collection) or withAttributeNames(java.util.Collection) if you want to override the existing values.

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

Parameters:
attributeNames A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withAttributeNames(String... attributeNames) {
        if (getAttributeNames() == nullsetAttributeNames(new java.util.ArrayList<String>(attributeNames.length));
        for (String value : attributeNames) {
            getAttributeNames().add(value);
        }
        return this;
    }
    
    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).

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

Parameters:
attributeNames A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
Returns:
A reference to this updated object so that method calls can be chained together.
        if (attributeNames == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringattributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(attributeNames.size());
            attributeNamesCopy.addAll(attributeNames);
            this. = attributeNamesCopy;
        }
        return this;
    }

    
A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).

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

Parameters:
attributeNames A list of attributes that need to be returned along with each message.

The following lists the names and descriptions of the attributes that can be returned:

  • All - returns all values.
  • ApproximateFirstReceiveTimestamp - returns the time when the message was first received from the queue (epoch time in milliseconds).
  • ApproximateReceiveCount - returns the number of times a message has been received from the queue but not deleted.
  • SenderId - returns the AWS account number (or the IP address, if anonymous access is allowed) of the sender.
  • SentTimestamp - returns the time when the message was sent to the queue (epoch time in milliseconds).
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withAttributeNames(QueueAttributeName... attributeNames) {
        java.util.ArrayList<StringattributeNamesCopy = new java.util.ArrayList<String>(attributeNames.length);
        for (QueueAttributeName member : attributeNames) {
            attributeNamesCopy.add(member.toString());
        }
        if (getAttributeNames() == null) {
            setAttributeNames(attributeNamesCopy);
        } else {
            getAttributeNames().addAll(attributeNamesCopy);
        }
        return this;
    }

    
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

Returns:
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

Parameters:
messageAttributeNames The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

    public void setMessageAttributeNames(java.util.Collection<StringmessageAttributeNames) {
        if (messageAttributeNames == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringmessageAttributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(messageAttributeNames.size());
        messageAttributeNamesCopy.addAll(messageAttributeNames);
        this. = messageAttributeNamesCopy;
    }
    
    
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

NOTE: This method appends the values to the existing list (if any). Use setMessageAttributeNames(java.util.Collection) or withMessageAttributeNames(java.util.Collection) if you want to override the existing values.

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

Parameters:
messageAttributeNames The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withMessageAttributeNames(String... messageAttributeNames) {
        if (getMessageAttributeNames() == nullsetMessageAttributeNames(new java.util.ArrayList<String>(messageAttributeNames.length));
        for (String value : messageAttributeNames) {
            getMessageAttributeNames().add(value);
        }
        return this;
    }
    
    
The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

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

Parameters:
messageAttributeNames The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name cannot start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "foo.*" to return all message attributes starting with the "foo" prefix.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withMessageAttributeNames(java.util.Collection<StringmessageAttributeNames) {
        if (messageAttributeNames == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringmessageAttributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(messageAttributeNames.size());
            messageAttributeNamesCopy.addAll(messageAttributeNames);
            this. = messageAttributeNamesCopy;
        }
        return this;
    }

    
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

Returns:
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

    public Integer getMaxNumberOfMessages() {
        return ;
    }
    
    
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

Parameters:
maxNumberOfMessages The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

    public void setMaxNumberOfMessages(Integer maxNumberOfMessages) {
        this. = maxNumberOfMessages;
    }
    
    
The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

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

Parameters:
maxNumberOfMessages The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. Values can be from 1 to 10. Default is 1.

All of the messages are not necessarily returned.

Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withMaxNumberOfMessages(Integer maxNumberOfMessages) {
        this. = maxNumberOfMessages;
        return this;
    }

    
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Returns:
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
    public Integer getVisibilityTimeout() {
        return ;
    }
    
    
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Parameters:
visibilityTimeout The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
    public void setVisibilityTimeout(Integer visibilityTimeout) {
        this. = visibilityTimeout;
    }
    
    
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

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

Parameters:
visibilityTimeout The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withVisibilityTimeout(Integer visibilityTimeout) {
        this. = visibilityTimeout;
        return this;
    }

    
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.

Returns:
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
    public Integer getWaitTimeSeconds() {
        return ;
    }
    
    
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.

Parameters:
waitTimeSeconds The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
    public void setWaitTimeSeconds(Integer waitTimeSeconds) {
        this. = waitTimeSeconds;
    }
    
    
The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.

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

Parameters:
waitTimeSeconds The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReceiveMessageRequest withWaitTimeSeconds(Integer waitTimeSeconds) {
        this. = waitTimeSeconds;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getQueueUrl() != nullsb.append("QueueUrl: " + getQueueUrl() + ",");
        if (getAttributeNames() != nullsb.append("AttributeNames: " + getAttributeNames() + ",");
        if (getMessageAttributeNames() != nullsb.append("MessageAttributeNames: " + getMessageAttributeNames() + ",");
        if (getMaxNumberOfMessages() != nullsb.append("MaxNumberOfMessages: " + getMaxNumberOfMessages() + ",");
        if (getVisibilityTimeout() != nullsb.append("VisibilityTimeout: " + getVisibilityTimeout() + ",");
        if (getWaitTimeSeconds() != nullsb.append("WaitTimeSeconds: " + getWaitTimeSeconds() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode()); 
        hashCode = prime * hashCode + ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode()); 
        hashCode = prime * hashCode + ((getMessageAttributeNames() == null) ? 0 : getMessageAttributeNames().hashCode()); 
        hashCode = prime * hashCode + ((getMaxNumberOfMessages() == null) ? 0 : getMaxNumberOfMessages().hashCode()); 
        hashCode = prime * hashCode + ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode()); 
        hashCode = prime * hashCode + ((getWaitTimeSeconds() == null) ? 0 : getWaitTimeSeconds().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ReceiveMessageRequest == falsereturn false;
        ReceiveMessageRequest other = (ReceiveMessageRequest)obj;
        
        if (other.getQueueUrl() == null ^ this.getQueueUrl() == nullreturn false;
        if (other.getQueueUrl() != null && other.getQueueUrl().equals(this.getQueueUrl()) == falsereturn false
        if (other.getAttributeNames() == null ^ this.getAttributeNames() == nullreturn false;
        if (other.getAttributeNames() != null && other.getAttributeNames().equals(this.getAttributeNames()) == falsereturn false
        if (other.getMessageAttributeNames() == null ^ this.getMessageAttributeNames() == nullreturn false;
        if (other.getMessageAttributeNames() != null && other.getMessageAttributeNames().equals(this.getMessageAttributeNames()) == falsereturn false
        if (other.getMaxNumberOfMessages() == null ^ this.getMaxNumberOfMessages() == nullreturn false;
        if (other.getMaxNumberOfMessages() != null && other.getMaxNumberOfMessages().equals(this.getMaxNumberOfMessages()) == falsereturn false
        if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == nullreturn false;
        if (other.getVisibilityTimeout() != null && other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == falsereturn false
        if (other.getWaitTimeSeconds() == null ^ this.getWaitTimeSeconds() == nullreturn false;
        if (other.getWaitTimeSeconds() != null && other.getWaitTimeSeconds().equals(this.getWaitTimeSeconds()) == falsereturn false
        return true;
    }
    
    @Override
    public ReceiveMessageRequest clone() {
        
            return (ReceiveMessageRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X