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.simpleemail.model;
 

Represents sending statistics data. Each SendDataPoint contains statistics for a 15-minute period of sending activity.

 
 public class SendDataPoint implements SerializableCloneable {

    
Time of the data point.
 
     private java.util.Date timestamp;

    
Number of emails that have been enqueued for sending.
 
     private Long deliveryAttempts;

    
Number of emails that have bounced.
 
     private Long bounces;

    
Number of unwanted emails that were rejected by recipients.
 
     private Long complaints;

    
Number of emails rejected by Amazon SES.
 
     private Long rejects;

    
Time of the data point.

Returns:
Time of the data point.
 
     public java.util.Date getTimestamp() {
         return ;
     }
    
    
Time of the data point.

Parameters:
timestamp Time of the data point.
 
     public void setTimestamp(java.util.Date timestamp) {
         this. = timestamp;
     }
    
    
Time of the data point.

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

Parameters:
timestamp Time of the data point.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public SendDataPoint withTimestamp(java.util.Date timestamp) {
         this. = timestamp;
         return this;
     }

    
Number of emails that have been enqueued for sending.

Returns:
Number of emails that have been enqueued for sending.
 
     public Long getDeliveryAttempts() {
         return ;
     }
    
    
Number of emails that have been enqueued for sending.

Parameters:
deliveryAttempts Number of emails that have been enqueued for sending.
 
     public void setDeliveryAttempts(Long deliveryAttempts) {
        this. = deliveryAttempts;
    }
    
    
Number of emails that have been enqueued for sending.

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

Parameters:
deliveryAttempts Number of emails that have been enqueued for sending.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SendDataPoint withDeliveryAttempts(Long deliveryAttempts) {
        this. = deliveryAttempts;
        return this;
    }

    
Number of emails that have bounced.

Returns:
Number of emails that have bounced.
    public Long getBounces() {
        return ;
    }
    
    
Number of emails that have bounced.

Parameters:
bounces Number of emails that have bounced.
    public void setBounces(Long bounces) {
        this. = bounces;
    }
    
    
Number of emails that have bounced.

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

Parameters:
bounces Number of emails that have bounced.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SendDataPoint withBounces(Long bounces) {
        this. = bounces;
        return this;
    }

    
Number of unwanted emails that were rejected by recipients.

Returns:
Number of unwanted emails that were rejected by recipients.
    public Long getComplaints() {
        return ;
    }
    
    
Number of unwanted emails that were rejected by recipients.

Parameters:
complaints Number of unwanted emails that were rejected by recipients.
    public void setComplaints(Long complaints) {
        this. = complaints;
    }
    
    
Number of unwanted emails that were rejected by recipients.

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

Parameters:
complaints Number of unwanted emails that were rejected by recipients.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SendDataPoint withComplaints(Long complaints) {
        this. = complaints;
        return this;
    }

    
Number of emails rejected by Amazon SES.

Returns:
Number of emails rejected by Amazon SES.
    public Long getRejects() {
        return ;
    }
    
    
Number of emails rejected by Amazon SES.

Parameters:
rejects Number of emails rejected by Amazon SES.
    public void setRejects(Long rejects) {
        this. = rejects;
    }
    
    
Number of emails rejected by Amazon SES.

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

Parameters:
rejects Number of emails rejected by Amazon SES.
Returns:
A reference to this updated object so that method calls can be chained together.
    public SendDataPoint withRejects(Long rejects) {
        this. = rejects;
        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 (getTimestamp() != nullsb.append("Timestamp: " + getTimestamp() + ",");
        if (getDeliveryAttempts() != nullsb.append("DeliveryAttempts: " + getDeliveryAttempts() + ",");
        if (getBounces() != nullsb.append("Bounces: " + getBounces() + ",");
        if (getComplaints() != nullsb.append("Complaints: " + getComplaints() + ",");
        if (getRejects() != nullsb.append("Rejects: " + getRejects() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getDeliveryAttempts() == null) ? 0 : getDeliveryAttempts().hashCode()); 
        hashCode = prime * hashCode + ((getBounces() == null) ? 0 : getBounces().hashCode()); 
        hashCode = prime * hashCode + ((getComplaints() == null) ? 0 : getComplaints().hashCode()); 
        hashCode = prime * hashCode + ((getRejects() == null) ? 0 : getRejects().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SendDataPoint == falsereturn false;
        SendDataPoint other = (SendDataPoint)obj;
        
        if (other.getTimestamp() == null ^ this.getTimestamp() == nullreturn false;
        if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == falsereturn false
        if (other.getDeliveryAttempts() == null ^ this.getDeliveryAttempts() == nullreturn false;
        if (other.getDeliveryAttempts() != null && other.getDeliveryAttempts().equals(this.getDeliveryAttempts()) == falsereturn false
        if (other.getBounces() == null ^ this.getBounces() == nullreturn false;
        if (other.getBounces() != null && other.getBounces().equals(this.getBounces()) == falsereturn false
        if (other.getComplaints() == null ^ this.getComplaints() == nullreturn false;
        if (other.getComplaints() != null && other.getComplaints().equals(this.getComplaints()) == falsereturn false
        if (other.getRejects() == null ^ this.getRejects() == nullreturn false;
        if (other.getRejects() != null && other.getRejects().equals(this.getRejects()) == falsereturn false
        return true;
    }
    
    @Override
    public SendDataPoint clone() {
        try {
            return (SendDataPointsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X