Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 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;
 

Encloses a receipt handle and an entry id for each message in ChangeMessageVisibilityBatch.

IMPORTANT: All of the following parameters are list parameters that must be prefixed with ChangeMessageVisibilityBatchRequestEntry.n, where n is an integer value starting with 1. For example, a parameter list for this action might look like this:

MessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2

MessageVisibilityBatchRequestEntry.1.ReceiptHandle=Your_Receipt_Handle

ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45

 
 public class ChangeMessageVisibilityBatchRequestEntry implements Serializable {

    
An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.
 
     private String id;

    
A receipt handle.
 
     private String receiptHandle;

    
The new value (in seconds) for the message's visibility timeout.
 
     private Integer visibilityTimeout;

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

Parameters:
id An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.
receiptHandle A receipt handle.
 
     public ChangeMessageVisibilityBatchRequestEntry(String idString receiptHandle) {
         setId(id);
         setReceiptHandle(receiptHandle);
     }

    
An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

Returns:
An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.
 
     public String getId() {
         return ;
     }
    
    
An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

Parameters:
id An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.
    public void setId(String id) {
        this. = id;
    }
    
    
An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.

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

Parameters:
id An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = id;
        return this;
    }

    
A receipt handle.

Returns:
A receipt handle.
    public String getReceiptHandle() {
        return ;
    }
    
    
A receipt handle.

Parameters:
receiptHandle A receipt handle.
    public void setReceiptHandle(String receiptHandle) {
        this. = receiptHandle;
    }
    
    
A receipt handle.

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

Parameters:
receiptHandle A receipt handle.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = receiptHandle;
        return this;
    }

    
The new value (in seconds) for the message's visibility timeout.

Returns:
The new value (in seconds) for the message's visibility timeout.
    public Integer getVisibilityTimeout() {
        return ;
    }
    
    
The new value (in seconds) for the message's visibility timeout.

Parameters:
visibilityTimeout The new value (in seconds) for the message's visibility timeout.
    public void setVisibilityTimeout(Integer visibilityTimeout) {
        this. = visibilityTimeout;
    }
    
    
The new value (in seconds) for the message's visibility timeout.

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

Parameters:
visibilityTimeout The new value (in seconds) for the message's visibility timeout.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = visibilityTimeout;
        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 (getId() != nullsb.append("Id: " + getId() + ",");
        if (getReceiptHandle() != nullsb.append("ReceiptHandle: " + getReceiptHandle() + ",");
        if (getVisibilityTimeout() != nullsb.append("VisibilityTimeout: " + getVisibilityTimeout() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); 
        hashCode = prime * hashCode + ((getReceiptHandle() == null) ? 0 : getReceiptHandle().hashCode()); 
        hashCode = prime * hashCode + ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ChangeMessageVisibilityBatchRequestEntry == falsereturn false;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getReceiptHandle() == null ^ this.getReceiptHandle() == nullreturn false;
        if (other.getReceiptHandle() != null && other.getReceiptHandle().equals(this.getReceiptHandle()) == falsereturn false
        if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == nullreturn false;
        if (other.getVisibilityTimeout() != null && other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X